shutdown after startNode completes

This commit is contained in:
Shawn 2025-06-04 17:51:28 -07:00
parent 08c0a7669a
commit e7c497b28f

View file

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