mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
stagedsync: borheimdall segments min check minor improvement (#9168)
This commit is contained in:
parent
b4e6563e4a
commit
19b9504039
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user