Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2204,6 +2204,7 @@ func (bc *BlockChain) reorg(oldBlock, newBlock *types.Header) error {
// as the txlookups should be changed atomically, and all subsequent
// reads should be blocked until the mutation is complete.
bc.txLookupLock.Lock()
defer bc.txLookupLock.Unlock()

var (
deletedTxs []common.Hash
Expand Down Expand Up @@ -2314,9 +2315,6 @@ func (bc *BlockChain) reorg(oldBlock, newBlock *types.Header) error {
// Reset the tx lookup cache to clear stale txlookup cache.
bc.txLookupCache.Purge()

// Release the tx-lookup lock after mutation.
bc.txLookupLock.Unlock()

return nil
}

Expand Down
Loading