Defer unlock of orphan mutex in addOrphanBlock.
This was pointed out by saracen on the btcd IRC channel.
This commit is contained in:
parent
b041971ca8
commit
acdce27f9f
1 changed files with 1 additions and 1 deletions
2
chain.go
2
chain.go
|
@ -297,7 +297,7 @@ func (b *BlockChain) addOrphanBlock(block *btcutil.Block) {
|
|||
// of near the top since removeOrphanBlock does its own locking and
|
||||
// the range iterator is not invalidated by removing map entries.
|
||||
b.orphanLock.Lock()
|
||||
b.orphanLock.Unlock()
|
||||
defer b.orphanLock.Unlock()
|
||||
|
||||
// Insert the block into the orphan map with an expiration time
|
||||
// 1 hour from now.
|
||||
|
|
Loading…
Reference in a new issue