diff --git a/eth/stagedsync/stage_bor_heimdall.go b/eth/stagedsync/stage_bor_heimdall.go index 1fb367156..02044314f 100644 --- a/eth/stagedsync/stage_bor_heimdall.go +++ b/eth/stagedsync/stage_bor_heimdall.go @@ -322,7 +322,10 @@ func BorHeimdallForward( var snap *bor.Snapshot if header != nil { - if cfg.blockReader.BorSnapshots().SegmentsMin() == 0 { + if blockNum > cfg.blockReader.BorSnapshots().SegmentsMin() { + // SegmentsMin is only set if running as an uploader process (check SnapshotsCfg.snapshotUploader and + // UploadLocationFlag) when we remove snapshots based on FrozenBlockLimit and number of uploaded snapshots + // avoid calling this if block for blockNums <= SegmentsMin to avoid reinsertion of snapshots snap = loadSnapshot(blockNum, header.Hash(), cfg.borConfig, recents, signatures, cfg.snapDb, logger) if snap == nil {