Skip to content

Commit

Permalink
Add mutex for delete(m.addrs, ..) in MarkUsed
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Yocom-Piatt committed Jun 15, 2015
1 parent 411eacb commit a735e3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions waddrmgr/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit a735e3c

Please sign in to comment.