diff options
author | ferhat elmas <elmas.ferhat@gmail.com> | 2018-01-02 19:50:46 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2018-01-02 19:50:46 +0800 |
commit | 5866626b0896bafb74e140bc44ddd24ff9006d91 (patch) | |
tree | 33a22af18c681e35be6c7951a12339c6da0b7f57 /core | |
parent | c495bca4adef24811e92f9dfa5149b32ac81ef65 (diff) | |
download | go-tangerine-5866626b0896bafb74e140bc44ddd24ff9006d91.tar go-tangerine-5866626b0896bafb74e140bc44ddd24ff9006d91.tar.gz go-tangerine-5866626b0896bafb74e140bc44ddd24ff9006d91.tar.bz2 go-tangerine-5866626b0896bafb74e140bc44ddd24ff9006d91.tar.lz go-tangerine-5866626b0896bafb74e140bc44ddd24ff9006d91.tar.xz go-tangerine-5866626b0896bafb74e140bc44ddd24ff9006d91.tar.zst go-tangerine-5866626b0896bafb74e140bc44ddd24ff9006d91.zip |
core, p2p/discv5: use time.NewTicker instead of time.Tick (#15747)
Diffstat (limited to 'core')
-rw-r--r-- | core/blockchain.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 325753c7a..812f9e562 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1196,10 +1196,11 @@ func (bc *BlockChain) PostChainEvents(events []interface{}, logs []*types.Log) { } func (bc *BlockChain) update() { - futureTimer := time.Tick(5 * time.Second) + futureTimer := time.NewTicker(5 * time.Second) + defer futureTimer.Stop() for { select { - case <-futureTimer: + case <-futureTimer.C: bc.procFutureBlocks() case <-bc.quit: return |