diff --git a/eth/stagedsync/exec3.go b/eth/stagedsync/exec3.go index 624361dbe47..5ecb3616573 100644 --- a/eth/stagedsync/exec3.go +++ b/eth/stagedsync/exec3.go @@ -923,6 +923,7 @@ Loop: tt = time.Now() applyTx.CollectMetrics() + if !useExternalTx { tt = time.Now() if err = applyTx.Commit(); err != nil { @@ -951,6 +952,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())),