forked from TrueCloudLab/neoneo-go
stateroot: fix incompleteRoot leak
Drop old incomplete roots from the map.
This commit is contained in:
parent
3d49f7d99a
commit
39571745cb
1 changed files with 3 additions and 0 deletions
|
@ -35,6 +35,9 @@ runloop:
|
||||||
} else if err := s.signAndSend(r); err != nil {
|
} else if err := s.signAndSend(r); err != nil {
|
||||||
s.log.Error("can't sign or send state root", zap.Error(err))
|
s.log.Error("can't sign or send state root", zap.Error(err))
|
||||||
}
|
}
|
||||||
|
s.srMtx.Lock()
|
||||||
|
delete(s.incompleteRoots, b.Index-voteValidEndInc)
|
||||||
|
s.srMtx.Unlock()
|
||||||
case <-s.done:
|
case <-s.done:
|
||||||
break runloop
|
break runloop
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue