Skip to content

Commit

Permalink
Stop dropping queued block senders without sending a response
Browse files Browse the repository at this point in the history
This causes a rare panic, because Zebra expects every queued sender
to send a response.
  • Loading branch information
teor2345 authored and dconnolly committed Oct 7, 2021
1 parent c7c1a8a commit 0b82298
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zebra-state/src/service/non_finalized_state/queued_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 0b82298

Please sign in to comment.