No need to check map before removing a key.
This commit is contained in:
parent
aa6892a32a
commit
afee3e2ca7
1 changed files with 1 additions and 3 deletions
|
@ -2790,9 +2790,7 @@ func StoreNotifiedMempoolRecvTxs(add, remove chan btcwire.OutPoint,
|
||||||
m[op] = struct{}{}
|
m[op] = struct{}{}
|
||||||
|
|
||||||
case op := <-remove:
|
case op := <-remove:
|
||||||
if _, ok := m[op]; ok {
|
|
||||||
delete(m, op)
|
delete(m, op)
|
||||||
}
|
|
||||||
|
|
||||||
case req := <-access:
|
case req := <-access:
|
||||||
_, ok := m[req.op]
|
_, ok := m[req.op]
|
||||||
|
|
Loading…
Reference in a new issue