Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed May 27, 2024
1 parent ee45dad commit b0f358e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions turbo/stages/stageloop.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func StageLoop(
// ProcessFrozenBlocks - withuot global rwtx
func ProcessFrozenBlocks(ctx context.Context, db kv.RwDB, blockReader services.FullBlockReader, sync *stagedsync.Sync) error {
sawZeroBlocksTimes := 0
firstCycle := true
for {
var finStageProgress uint64
if blockReader.FrozenBlocks() > 0 {
Expand All @@ -127,15 +128,16 @@ func ProcessFrozenBlocks(ctx context.Context, db kv.RwDB, blockReader services.F

log.Debug("[sync] processFrozenBlocks", "finStageProgress", finStageProgress, "frozenBlocks", blockReader.FrozenBlocks())

more, err := sync.Run(db, wrap.TxContainer{}, true, false)
more, err := sync.Run(db, wrap.TxContainer{}, firstCycle, false)
if err != nil {
return err
}

if err := sync.RunPrune(db, nil, true, false); err != nil {
if err := sync.RunPrune(db, nil, firstCycle, false); err != nil {
return err
}

firstCycle = false
if !more {
break
}
Expand Down

0 comments on commit b0f358e

Please sign in to comment.