diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 08e7c1d5b8..c6cb9fc39e 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -342,6 +342,10 @@ func geth(ctx *cli.Context) error { defer stack.Close() startNode(ctx, stack, backend, false) + + upgradeBlockHeight := uint64(10) + utils.ShutdownAtUpgradeBlockHeight(ctx, stack, upgradeBlockHeight) + stack.Wait() return nil } @@ -355,9 +359,6 @@ func startNode(ctx *cli.Context, stack *node.Node, backend ethapi.Backend, isCon // Start up the node itself utils.StartNode(ctx, stack, isConsole) - upgradeBlockHeight := uint64(10) - utils.ShutdownAtUpgradeBlockHeight(ctx, stack, upgradeBlockHeight) - // Unlock any account specifically requested unlockAccounts(ctx, stack)