Add a missing mutex lock/unlock.

Spotted by dhill.
This commit is contained in:
Josh Rickmar 2013-11-21 10:27:58 -05:00
parent 5efbcecb53
commit 417aa63534

View file

@ -310,8 +310,10 @@ func (a *Account) RescanAddresses(beginBlock int32, addrs map[string]struct{}) {
return false
}
if bs, err := GetCurBlock(); err == nil {
a.SetSyncedWith(&bs)
a.mtx.Lock()
a.Wallet.SetSyncedWith(&bs)
a.dirty = true
a.mtx.Unlock()
if err = a.writeDirtyToDisk(); err != nil {
log.Errorf("cannot sync dirty wallet: %v",
err)