good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 79bb9300 authored by chuwt's avatar chuwt Committed by GitHub
Browse files

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

parent ea4bc2db
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,7 @@ func (p *pruner) loop() { ...@@ -62,6 +62,7 @@ func (p *pruner) loop() {
// cleanTicker is the ticker used to trigger a history clean 2 times a day. // cleanTicker is the ticker used to trigger a history clean 2 times a day.
var cleanTicker = time.NewTicker(12 * time.Hour) var cleanTicker = time.NewTicker(12 * time.Hour)
defer cleanTicker.Stop()
// pruning finds the sections that have been processed by all indexers // pruning finds the sections that have been processed by all indexers
// and deletes all historical chain data. // and deletes all historical chain data.
......
...@@ -129,6 +129,8 @@ func (b *SyncBloom) init(database ethdb.Iteratee) { ...@@ -129,6 +129,8 @@ func (b *SyncBloom) init(database ethdb.Iteratee) {
func (b *SyncBloom) meter() { func (b *SyncBloom) meter() {
// check every second // check every second
tick := time.NewTicker(1 * time.Second) tick := time.NewTicker(1 * time.Second)
defer tick.Stop()
for { for {
select { select {
case <-tick.C: case <-tick.C:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment