Lock seenBlocks on cleanupSeenBlocks method
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
009e507d5d
commit
52b2d617c0
|
@ -840,6 +840,9 @@ func (c *SideChain) pruneOldBlocks() {
|
|||
}
|
||||
|
||||
func (c *SideChain) cleanupSeenBlocks() (cleaned int) {
|
||||
c.seenBlocksLock.Lock()
|
||||
defer c.seenBlocksLock.Unlock()
|
||||
|
||||
for k, _ := range c.seenBlocks {
|
||||
if c.getPoolBlockByTemplateId(k.TemplateId()) == nil {
|
||||
delete(c.seenBlocks, k)
|
||||
|
|
Loading…
Reference in a new issue