From 1dd3b8564993618e88432a305bd82f02f1e8b7e6 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Mon, 8 Jan 2024 18:12:09 +0200 Subject: [PATCH] backend: Don't remove block hashes on inspection Signed-off-by: Alexandru Vasile --- subxt/src/backend/unstable/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/subxt/src/backend/unstable/mod.rs b/subxt/src/backend/unstable/mod.rs index 52a5e6398f..97cf15cdf0 100644 --- a/subxt/src/backend/unstable/mod.rs +++ b/subxt/src/backend/unstable/mod.rs @@ -539,12 +539,11 @@ impl Backend for UnstableBackend { // If we have a finalized hash, we are done looking for tx events and we are just waiting // for a pinned block with a matching hash (which must appear eventually given it's finalized). if let Some(hash) = &finalized_hash { - if let Some((SeenBlockMarker::Finalized, block_ref)) = seen_blocks.remove(hash) - { + if let Some((SeenBlockMarker::Finalized, block_ref)) = seen_blocks.get(hash) { // Found it! Hand back the event with a pinned block. We're done. done = true; let ev = TransactionStatus::InFinalizedBlock { - hash: block_ref.into(), + hash: block_ref.clone().into(), }; return Poll::Ready(Some(Ok(ev))); } else {