Skip to content

Commit

Permalink
Add max runtime version in get_info
Browse files Browse the repository at this point in the history
  • Loading branch information
kvinwang committed Mar 2, 2023
1 parent 1325ec9 commit 230d444
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/phactory/api/proto
Submodule proto updated 1 files
+2 −0 pruntime_rpc.proto
4 changes: 4 additions & 0 deletions crates/phactory/src/prpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ impl<Platform: pal::Platform + Serialize + DeserializeOwned> Phactory<Platform>
can_load_chain_state: self.can_load_chain_state,
safe_mode_level: self.args.safe_mode_level as _,
current_block_time,
max_supported_pink_runtime_version: {
let (major, minor) = ::pink::runtimes::max_supported_version();
format!("{major}.{minor}")
},
};
info!("Got info: {:?}", info.debug_info());
info
Expand Down
4 changes: 4 additions & 0 deletions crates/pink/runner/src/runtimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ fn in_enclave() -> i32 {
}

pub mod v1;

pub fn max_supported_version() -> (u32, u32) {
(1, 0)
}
3 changes: 2 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
},
"devDependencies": {
"protobufjs": "^6.11.3"
}
},
"packageManager": "[email protected]"
}

0 comments on commit 230d444

Please sign in to comment.