Add mutex for delete(m.addrs, ..) in MarkUsed

This commit is contained in:
Alex Yocom-Piatt 2015-06-15 12:01:18 -05:00
parent 411eacbeea
commit a735e3c3e2

View file

@ -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
}