diff --git a/eth/stagedsync/bor_heimdall_shared.go b/eth/stagedsync/bor_heimdall_shared.go index 85c70abd7f7..2569e8228a1 100644 --- a/eth/stagedsync/bor_heimdall_shared.go +++ b/eth/stagedsync/bor_heimdall_shared.go @@ -525,7 +525,7 @@ func fetchAndWriteHeimdallStateSyncEvents( } if lastEventRecord != nil { - logger.Info("putting state sync events", "blockNum", blockNum, "lastID", lastEventRecord.ID) + logger.Debug("putting state sync events", "blockNum", blockNum, "lastID", lastEventRecord.ID) var blockNumBuf [8]byte binary.BigEndian.PutUint64(blockNumBuf[:], blockNum) diff --git a/eth/stagedsync/stage_bor_heimdall.go b/eth/stagedsync/stage_bor_heimdall.go index 381511d02d3..11ba6d2423b 100644 --- a/eth/stagedsync/stage_bor_heimdall.go +++ b/eth/stagedsync/stage_bor_heimdall.go @@ -296,6 +296,11 @@ func BorHeimdallForward( return err } + // this will happen if for example chaindb is removed + if lastPersistedBlockNum > blockNum { + lastPersistedBlockNum = blockNum + } + // if the last time we persisted snapshots is too far away re-run the forward // initialization process - this is to avoid memory growth due to recusrion // in persistValidatorSets