Skip to content
Snippets Groups Projects
Commit 703009fb authored by ordian's avatar ordian Committed by GitHub
Browse files

malus: dont panic on missing validation data (#6952)

* malus: don't panic if can't fetch validation data

* malus: add fast-runtime feature
parent d8723a08
Branches
No related merge requests found
......@@ -37,6 +37,7 @@ rand = "0.8.5"
[features]
default = []
fast-runtime = ["polkadot-cli/fast-runtime"]
[dev-dependencies]
polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" }
......
......@@ -122,17 +122,22 @@ where
{
Ok(Some((validation_data, validation_code))) => {
sender
.send((validation_data, validation_code, n_validators))
.send(Some((
validation_data,
validation_code,
n_validators,
)))
.expect("channel is still open");
},
_ => {
panic!("Unable to fetch validation data");
sender.send(None).expect("channel is still open");
},
}
}),
);
let (validation_data, validation_code, n_validators) = receiver.recv().unwrap();
let (validation_data, validation_code, n_validators) =
receiver.recv().unwrap()?;
let validation_data_hash = validation_data.hash();
let validation_code_hash = validation_code.hash();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment