mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 18:01:03 +00:00
malus: dont panic on missing validation data (#6952)
* malus: don't panic if can't fetch validation data * malus: add fast-runtime feature
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user