Add mutex for delete(m.addrs, ..) in MarkUsed
This commit is contained in:
parent
411eacbeea
commit
a735e3c3e2
1 changed files with 2 additions and 0 deletions
|
@ -1391,7 +1391,9 @@ func (m *Manager) MarkUsed(address btcutil.Address) error {
|
||||||
return maybeConvertDbError(err)
|
return maybeConvertDbError(err)
|
||||||
}
|
}
|
||||||
// Clear caches which might have stale entries for used addresses
|
// Clear caches which might have stale entries for used addresses
|
||||||
|
m.mtx.Lock()
|
||||||
delete(m.addrs, addrKey(addressID))
|
delete(m.addrs, addrKey(addressID))
|
||||||
|
m.mtx.Unlock()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue