trie, les: add missing calls to Ticker.Stop (#23415)

pull/23449/head
chuwt 3 years ago committed by GitHub
parent ea4bc2dbff
commit 79bb9300c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      les/pruner.go
  2. 2
      trie/sync_bloom.go

@ -62,6 +62,7 @@ func (p *pruner) loop() {
// cleanTicker is the ticker used to trigger a history clean 2 times a day.
var cleanTicker = time.NewTicker(12 * time.Hour)
defer cleanTicker.Stop()
// pruning finds the sections that have been processed by all indexers
// and deletes all historical chain data.

@ -129,6 +129,8 @@ func (b *SyncBloom) init(database ethdb.Iteratee) {
func (b *SyncBloom) meter() {
// check every second
tick := time.NewTicker(1 * time.Second)
defer tick.Stop()
for {
select {
case <-tick.C:

Loading…
Cancel
Save