Skip to content

Commit

Permalink
Use a log statement for which wasm is used
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed May 25, 2024
1 parent 2942122 commit 51f7e04
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion substrate/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ workspace = true
name = "serai-node"

[dependencies]
rand_core = "0.6"
zeroize = "1"
hex = "0.4"
log = "0.4"

rand_core = "0.6"
schnorrkel = "0.11"

libp2p = "0.52"
Expand Down
5 changes: 4 additions & 1 deletion substrate/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ fn account_from_name(name: &'static str) -> PublicKey {

fn wasm_binary() -> Vec<u8> {
// TODO: Accept a config of runtime path
if let Ok(binary) = std::fs::read("/runtime/serai.wasm") {
const WASM_PATH: &str = "/runtime/serai.wasm";
if let Ok(binary) = std::fs::read(WASM_PATH) {
log::info!("using {WASM_PATH}");
return binary;
}
log::info!("using built-in {WASM_PATH}");
WASM_BINARY.ok_or("compiled in wasm not available").unwrap().to_vec()
}

Expand Down

0 comments on commit 51f7e04

Please sign in to comment.