aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/blockchain.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index 264617857..1a60805a1 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -290,6 +290,9 @@ func (bc *BlockChain) AddConfirmedBlock(block *coreTypes.Block) error {
}
func (bc *BlockChain) RemoveConfirmedBlock(hash coreCommon.Hash) {
+ bc.confirmedBlocksMu.Lock()
+ defer bc.confirmedBlocksMu.Unlock()
+
blockInfo := bc.confirmedBlocks[hash]
for addr := range blockInfo.addresses {
bc.addressCounter[addr]--