Update cmd.go

This commit is contained in:
Shawn 2025-06-04 17:31:32 -07:00
parent f29e6ddb65
commit 08c0a7669a

View file

@ -124,6 +124,7 @@ func StartNode(ctx *cli.Context, stack *node.Node, isConsole bool) {
}
func ShutdownAtUpgradeBlockHeight(ctx *cli.Context, n *node.Node, upgradeBlockHeight uint64) {
log.Info("Starting goroutine to shutdown at upgrade block height", "upgradeBlockHeight", upgradeBlockHeight)
sub := n.EventMux().Subscribe(core.ChainHeadEvent{})
go func() {
defer sub.Unsubscribe()