Stop dropping queued block senders without sending a response

This causes a rare panic, because Zebra expects every queued sender
to send a response.
This commit is contained in:
teor 2021-10-07 12:10:58 +10:00 committed by Deirdre Connolly
parent c7c1a8a469
commit 0b82298645
1 changed files with 5 additions and 0 deletions

View File

@ -111,6 +111,11 @@ impl QueuedBlocks {
self.blocks.remove(&hash).expect("block is present");
let parent_hash = &expired_block.block.header.previous_block_hash;
// we don't care if the receiver was dropped
let _ = expired_sender.send(Err(
"pruned block at or below the finalized tip height".into()
));
// TODO: only remove UTXOs if there are no queued blocks with that UTXO
// (known_utxos is best-effort, so this is ok for now)
for outpoint in expired_block.new_outputs.keys() {