From afee3e2ca729a4d405db5ff1e94a5837b3e5afce Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Mon, 16 Jun 2014 15:32:08 -0500 Subject: [PATCH] No need to check map before removing a key. --- rpcserver.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index ce039ca..c6401f1 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2790,9 +2790,7 @@ func StoreNotifiedMempoolRecvTxs(add, remove chan btcwire.OutPoint, m[op] = struct{}{} case op := <-remove: - if _, ok := m[op]; ok { - delete(m, op) - } + delete(m, op) case req := <-access: _, ok := m[req.op]