mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-08-12 18:31:38 +00:00
grandpa: fix warp sync proof on missing data (#8795)
* grandpa: check for missing data when iterating through authority set changes * grandpa-warp-sync: handle missing data
This commit is contained in:
@@ -91,7 +91,10 @@ impl<Block: BlockT> WarpSyncProof<Block> {
|
||||
let mut proofs_encoded_len = 0;
|
||||
let mut proof_limit_reached = false;
|
||||
|
||||
for (_, last_block) in set_changes.iter_from(begin_number) {
|
||||
let set_changes = set_changes.iter_from(begin_number)
|
||||
.ok_or(HandleRequestError::MissingData)?;
|
||||
|
||||
for (_, last_block) in set_changes {
|
||||
let header = blockchain.header(BlockId::Number(*last_block))?.expect(
|
||||
"header number comes from previously applied set changes; must exist in db; qed.",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user