From 8be6e1b2cdeeba683e2691f6e9ff973c2cd8da5a Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Wed, 11 Jan 2023 10:16:21 +0700 Subject: [PATCH] STOP_AFTER_RECONSTITUTE=true --- eth/stagedsync/stage_execute.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eth/stagedsync/stage_execute.go b/eth/stagedsync/stage_execute.go index 19c62f9ad..a3d1a1882 100644 --- a/eth/stagedsync/stage_execute.go +++ b/eth/stagedsync/stage_execute.go @@ -5,6 +5,7 @@ import ( "encoding/binary" "errors" "fmt" + "os" "runtime" "time" @@ -257,6 +258,9 @@ func ExecBlockV3(s *StageState, u Unwinder, tx kv.RwTx, toBlock uint64, ctx cont if err := ReconstituteState(ctx, s, cfg.dirs, reconWorkers, cfg.batchSize, cfg.db, cfg.blockReader, log.New(), cfg.agg, cfg.engine, cfg.chainConfig, cfg.genesis); err != nil { return err } + if dbg.StopAfterReconst() { + os.Exit(1) + } } }