Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Jul 23, 2024
1 parent e2df678 commit f3cebdc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eth/stagedsync/exec3.go
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ Loop:

tt = time.Now()
applyTx.CollectMetrics()

if !useExternalTx {
tt = time.Now()
if err = applyTx.Commit(); err != nil {
Expand Down Expand Up @@ -945,6 +946,11 @@ Loop:
}(); err != nil {
return err
}

// on chain-tip: if batch is full then stop execution - to allow stages commit
if !execStage.CurrentSyncCycle.IsInitialCycle {
break Loop
}
logger.Info("Committed", "time", time.Since(commitStart),
"block", doms.BlockNum(), "txNum", doms.TxNum(),
"step", fmt.Sprintf("%.1f", float64(doms.TxNum())/float64(agg.StepSize())),
Expand Down

0 comments on commit f3cebdc

Please sign in to comment.