backend: Don't terminate the stream without correlation

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2024-01-09 16:40:07 +02:00
parent fb0e2c75ea
commit 21cf5cca6e
+6
View File
@@ -622,6 +622,12 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for UnstableBackend<T> {
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);
}