fix boot complete message when node is shut down

pull/4351/head
“GheisMohammadi” 2 years ago committed by Casey Gardiner
parent d23d98f689
commit f1d49a5c87
  1. 2
      api/service/stagedstreamsync/downloader.go

@ -95,7 +95,6 @@ func NewDownloader(host p2p.Host, bc core.BlockChain, isBeaconNode bool, config
func (d *Downloader) Start() { func (d *Downloader) Start() {
go func() { go func() {
d.waitForBootFinish() d.waitForBootFinish()
fmt.Printf("boot completed for shard %d, %d streams are connected\n", d.bc.ShardID(), d.syncProtocol.NumStreams())
d.loop() d.loop()
}() }()
@ -178,6 +177,7 @@ func (d *Downloader) waitForBootFinish() {
case <-checkCh: case <-checkCh:
if d.syncProtocol.NumStreams() >= d.config.InitStreams { if d.syncProtocol.NumStreams() >= d.config.InitStreams {
fmt.Printf("boot completed for shard %d ( %d streams are connected )\n", d.bc.ShardID(), d.syncProtocol.NumStreams())
return return
} }
case <-d.closeC: case <-d.closeC:

Loading…
Cancel
Save