Skip to content

Commit 3dcf018

Browse files
committed
fix(block_producer): discard action shouldn't be triggered if it's already in discarded state
1 parent 5278d2c commit 3dcf018

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

node/src/block_producer/block_producer_state.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ impl BlockProducerCurrentState {
319319
&self,
320320
best_tip: &ArcBlockWithHash,
321321
) -> Option<BlockProducerWonSlotDiscardReason> {
322+
if matches!(self, Self::WonSlotDiscarded { .. }) {
323+
return None;
324+
}
325+
322326
let won_slot = self.won_slot()?;
323327
if won_slot.global_slot() < best_tip.global_slot() {
324328
return Some(BlockProducerWonSlotDiscardReason::BestTipGlobalSlotHigher);

0 commit comments

Comments
 (0)