From a735e3c3e25c0dbe5ee886e38eb78e2511c71fba Mon Sep 17 00:00:00 2001 From: Alex Yocom-Piatt Date: Mon, 15 Jun 2015 12:01:18 -0500 Subject: [PATCH] Add mutex for delete(m.addrs, ..) in MarkUsed --- waddrmgr/manager.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/waddrmgr/manager.go b/waddrmgr/manager.go index 97a7d94..0faf52c 100644 --- a/waddrmgr/manager.go +++ b/waddrmgr/manager.go @@ -1391,7 +1391,9 @@ func (m *Manager) MarkUsed(address btcutil.Address) error { return maybeConvertDbError(err) } // Clear caches which might have stale entries for used addresses + m.mtx.Lock() delete(m.addrs, addrKey(addressID)) + m.mtx.Unlock() return nil }