mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
Caplin: skip finalized error (#7595)
This commit is contained in:
parent
2d3b3c3b8d
commit
027d83b556
@ -18,12 +18,12 @@ func (f *ForkChoiceStore) OnBlock(block *cltypes.SignedBeaconBlock, newPayload,
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if f.Slot() < block.Block.Slot {
|
if f.Slot() < block.Block.Slot {
|
||||||
return fmt.Errorf("block is too late compared to current_slot")
|
return fmt.Errorf("block is too early compared to current_slot")
|
||||||
}
|
}
|
||||||
// Check that block is later than the finalized epoch slot (optimization to reduce calls to get_ancestor)
|
// Check that block is later than the finalized epoch slot (optimization to reduce calls to get_ancestor)
|
||||||
finalizedSlot := f.computeStartSlotAtEpoch(f.finalizedCheckpoint.Epoch())
|
finalizedSlot := f.computeStartSlotAtEpoch(f.finalizedCheckpoint.Epoch())
|
||||||
if block.Block.Slot <= finalizedSlot {
|
if block.Block.Slot <= finalizedSlot {
|
||||||
return fmt.Errorf("block is too late compared to finalized")
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
config := f.forkGraph.Config()
|
config := f.forkGraph.Config()
|
||||||
|
Loading…
Reference in New Issue
Block a user