mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
cmd/geth: Removed unused failed event
This commit is contained in:
parent
91244340e2
commit
b939822a4c
1 changed files with 3 additions and 3 deletions
|
|
@ -346,15 +346,15 @@ func startNode(ctx *cli.Context, stack *node.Node) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var mux = stack.EventMux()
|
var mux = stack.EventMux()
|
||||||
var sub = mux.Subscribe(downloader.DoneEvent{},downloader.FailedEvent{})
|
var sub = mux.Subscribe(downloader.DoneEvent{})
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case headers := <-sub.Chan():
|
case headers := <-sub.Chan():
|
||||||
if headers == nil {
|
if headers == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if 600 >= time.Now().Unix()-headers.Time.Unix() {
|
if 600 >= time.Now().Unix()-headers.Time.Unix() {
|
||||||
log.Info("Synchronisation completed, checking", "check",exitWhenSynced)
|
log.Info("Synchronisation completed, checking", "check", exitWhenSynced)
|
||||||
time.Sleep(exitWhenSynced)
|
time.Sleep(exitWhenSynced)
|
||||||
stack.Stop()
|
stack.Stop()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue