Skip to content

Commit 84f02b9

Browse files
committed
fix(block_producer): slot falsely discarded if staking ledger between best tip and a won slot is different, which can happen at epoch boundary
1 parent b346ffe commit 84f02b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

node/src/block_producer/block_producer_state.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ impl BlockProducerCurrentState {
310310
return Some(BlockProducerWonSlotDiscardReason::BestTipGlobalSlotHigher);
311311
}
312312

313-
if &won_slot.staking_ledger_hash != best_tip.staking_epoch_ledger_hash() {
313+
if &won_slot.staking_ledger_hash != best_tip.staking_epoch_ledger_hash()
314+
&& &won_slot.staking_ledger_hash != best_tip.next_epoch_ledger_hash()
315+
{
314316
return Some(BlockProducerWonSlotDiscardReason::BestTipStakingLedgerDifferent);
315317
}
316318

0 commit comments

Comments
 (0)