2 Commits

Author SHA1 Message Date
Luke Parker
6beb615321 Minor typo fix 2024-05-25 20:31:32 -04:00
Luke Parker
51f7e047a3 Use a log statement for which wasm is used 2024-05-25 19:38:32 -04:00
3 changed files with 7 additions and 2 deletions

1
Cargo.lock generated
View File

@@ -8018,6 +8018,7 @@ dependencies = [
"hex",
"jsonrpsee",
"libp2p",
"log",
"pallet-transaction-payment-rpc",
"rand_core",
"sc-authority-discovery",

View File

@@ -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"

View File

@@ -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");
WASM_BINARY.ok_or("compiled in wasm not available").unwrap().to_vec()
}