From 98f0b218a5fae55b09a78f51081c6bcc98772de8 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Mon, 8 Jan 2024 18:09:47 +0200 Subject: [PATCH] backend: Save all seen blocks regardless finalized hash Signed-off-by: Alexandru Vasile --- subxt/src/backend/unstable/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/subxt/src/backend/unstable/mod.rs b/subxt/src/backend/unstable/mod.rs index c13b127c18..52a5e6398f 100644 --- a/subxt/src/backend/unstable/mod.rs +++ b/subxt/src/backend/unstable/mod.rs @@ -520,10 +520,9 @@ impl Backend for UnstableBackend { SeenBlock::New(block_ref) => { // Optimization: once we have a `finalized_hash`, we only care about finalized // block refs now and can avoid bothering to save new blocks. - if finalized_hash.is_none() { - seen_blocks - .insert(block_ref.hash(), (SeenBlockMarker::New, block_ref)); - } + // if finalized_hash.is_none() { + seen_blocks.insert(block_ref.hash(), (SeenBlockMarker::New, block_ref)); + // } } SeenBlock::Finalized(block_refs) => { for block_ref in block_refs {