From 21cf5cca6e7b714513b206ed7559bca168d3f253 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 9 Jan 2024 16:40:07 +0200 Subject: [PATCH] backend: Don't terminate the stream without correlation Signed-off-by: Alexandru Vasile --- subxt/src/backend/unstable/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subxt/src/backend/unstable/mod.rs b/subxt/src/backend/unstable/mod.rs index 34e2fc9b4f..7dfe25bc6d 100644 --- a/subxt/src/backend/unstable/mod.rs +++ b/subxt/src/backend/unstable/mod.rs @@ -622,6 +622,12 @@ impl Backend for UnstableBackend { let ev = match tx_progress.poll_next_unpin(cx) { Poll::Pending => return Poll::Pending, Poll::Ready(None) => { + // Do not terminate the stream until we can correlate the tx with a finalized block. + if finalized_hash.is_some() { + panic!("TERMINATE EARLY"); + continue; + } + done = true; return Poll::Ready(None); }