Add a missing mutex lock/unlock.
Spotted by dhill.
This commit is contained in:
parent
5efbcecb53
commit
417aa63534
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue