Skip to content

Commit 6a6823e

Browse files
authored
Merge pull request #2494 from subspace/chain-spec-without-pot-entropy
Fix node start when chain spec doesn't have PoT entropy
2 parents a518d2e + da522a2 commit 6a6823e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs

+1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ fn main() -> Result<(), Error> {
136136
.get("potExternalEntropy")
137137
.map(|d| match d.clone() {
138138
Value::String(s) => Ok(s.into_bytes()),
139+
Value::Null => Ok(Vec::new()),
139140
_ => Err(sc_service::Error::Other(
140141
"Failed to decode PoT initial key".to_string(),
141142
)),

crates/subspace-node/src/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ fn derive_pot_external_entropy(
104104
.get("potExternalEntropy")
105105
.map(|d| match d.clone() {
106106
Value::String(s) => Ok(s),
107+
Value::Null => Ok(String::new()),
107108
_ => Err(sc_service::Error::Other(
108109
"Failed to decode PoT initial key".to_string(),
109110
)),

0 commit comments

Comments
 (0)