Skip to content

Commit 88be2b0

Browse files
authored
Merge pull request #654 from openmina/fix/block_producer/slot_falsely_discarded
Fix Block Producer: slot falsely discarded if staking ledger between best tip and won slot is different
2 parents b346ffe + 84f02b9 commit 88be2b0

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)