mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-12 22:19:26 +00:00
Compare commits
2 Commits
294212238f
...
6beb615321
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6beb615321 | ||
|
|
51f7e047a3 |
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -8018,6 +8018,7 @@ dependencies = [
|
|||||||
"hex",
|
"hex",
|
||||||
"jsonrpsee",
|
"jsonrpsee",
|
||||||
"libp2p",
|
"libp2p",
|
||||||
|
"log",
|
||||||
"pallet-transaction-payment-rpc",
|
"pallet-transaction-payment-rpc",
|
||||||
"rand_core",
|
"rand_core",
|
||||||
"sc-authority-discovery",
|
"sc-authority-discovery",
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ workspace = true
|
|||||||
name = "serai-node"
|
name = "serai-node"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
rand_core = "0.6"
|
||||||
zeroize = "1"
|
zeroize = "1"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
|
log = "0.4"
|
||||||
|
|
||||||
rand_core = "0.6"
|
|
||||||
schnorrkel = "0.11"
|
schnorrkel = "0.11"
|
||||||
|
|
||||||
libp2p = "0.52"
|
libp2p = "0.52"
|
||||||
|
|||||||
@@ -18,9 +18,12 @@ fn account_from_name(name: &'static str) -> PublicKey {
|
|||||||
|
|
||||||
fn wasm_binary() -> Vec<u8> {
|
fn wasm_binary() -> Vec<u8> {
|
||||||
// TODO: Accept a config of runtime path
|
// 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;
|
return binary;
|
||||||
}
|
}
|
||||||
|
log::info!("using built-in wasm");
|
||||||
WASM_BINARY.ok_or("compiled in wasm not available").unwrap().to_vec()
|
WASM_BINARY.ok_or("compiled in wasm not available").unwrap().to_vec()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user