Skip to content

Commit

Permalink
correct data pruning (#7678)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 committed Jun 6, 2023
1 parent 37a8450 commit 5e682aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cl/phase1/forkchoice/fork_graph/fork_graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (f *ForkGraph) AddChainSegment(signedBlock *cltypes.SignedBeaconBlock, full
f.highestSeen = newState.Slot()
f.currentState = newState
f.currentStateBlockRoot = blockRoot
if newState.Slot()%snapshotStateEverySlot == 0 && f.nextReferenceState.Slot() < f.beaconCfg.SlotsPerEpoch && f.enabledPruning {
if newState.Slot()%snapshotStateEverySlot == 0 && f.nextReferenceState.Slot() > f.beaconCfg.SlotsPerEpoch && f.enabledPruning {
if err := f.removeOldData(); err != nil {
return nil, LogisticError, err
}
Expand Down

0 comments on commit 5e682aa

Please sign in to comment.