core: fix missing unlock in MemPool TryAdd()

Fixes deadlock on subsequent MemPool operations.
This commit is contained in:
Roman Khimov 2019-10-24 12:12:29 +03:00
parent 257ba1c2ad
commit 184d8a0180

View file

@ -106,6 +106,7 @@ func (mp MemPool) TryAdd(hash util.Uint256, pItem *PoolItem) bool {
mp.lock.RLock()
if _, ok := mp.unsortedTxn[hash]; ok {
mp.lock.RUnlock()
return false
}
mp.unsortedTxn[hash] = pItem