[stream] change time.Tick to Ticker

pull/3649/head
Jacky Wang 4 years ago committed by Leo Chen
parent 1770f1a30b
commit 62197e3a26
  1. 3
      hmy/downloader/beaconhelper.go

@ -57,9 +57,10 @@ func (bh *beaconHelper) close() {
}
func (bh *beaconHelper) loop() {
t := time.NewTicker(10 * time.Second)
for {
select {
case <-time.Tick(10 * time.Second):
case <-t.C:
bh.insertAsync()
case b, ok := <-bh.blockC:

Loading…
Cancel
Save