mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 14:16:44 +00:00
Update cmd.go
This commit is contained in:
parent
f29e6ddb65
commit
08c0a7669a
1 changed files with 1 additions and 0 deletions
|
|
@ -124,6 +124,7 @@ func StartNode(ctx *cli.Context, stack *node.Node, isConsole bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ShutdownAtUpgradeBlockHeight(ctx *cli.Context, n *node.Node, upgradeBlockHeight uint64) {
|
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{})
|
sub := n.EventMux().Subscribe(core.ChainHeadEvent{})
|
||||||
go func() {
|
go func() {
|
||||||
defer sub.Unsubscribe()
|
defer sub.Unsubscribe()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue