TODO: backend: allow finalized before new block

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2024-01-08 20:58:13 +02:00
parent 8aa6d8096b
commit 81b5b1c315
+10 -2
View File
@@ -532,9 +532,17 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for UnstableBackend<T> {
SeenBlock::Finalized(block_refs) => {
for block_ref in block_refs {
seen_blocks
.get_mut(&block_ref.hash())
.expect("finalized block seen before new block")
.entry(block_ref.hash())
.or_insert((
SeenBlockMarker::Finalized,
block_ref.clone(),
block_ref,
))
.0 = SeenBlockMarker::Finalized;
// .get_mut(&block_ref.hash())
// .expect("finalized block seen before new block")
// .0 = SeenBlockMarker::Finalized;
}
}
}