backend: Panic on finalized before new

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2024-01-09 17:13:40 +02:00
parent 21cf5cca6e
commit 8542a5918a
+4
View File
@@ -576,6 +576,10 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for UnstableBackend<T> {
}
SeenBlock::Finalized(block_refs) => {
for block_ref in block_refs {
if !seen_blocks.contains_key(&block_ref.hash()) {
panic!("Finalized before new Finalized {:#?}\n MEMLOG{:#?}\n SeenBlocks{:#?} \n Other{:#?}", block_ref.hash(), mem_log, seen_blocks, seen_other);
}
let entry = seen_blocks.entry(block_ref.hash()).or_insert((
SeenBlockMarker::Finalized,
block_ref.clone(),