backend: Don't remove block hashes on inspection

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2024-01-08 18:12:09 +02:00
parent 98f0b218a5
commit 1dd3b85649
+2 -3
View File
@@ -539,12 +539,11 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for UnstableBackend<T> {
// 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 {