From 417aa63534ef7315871bd08da3b60f6e2aeed081 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Thu, 21 Nov 2013 10:27:58 -0500 Subject: [PATCH] Add a missing mutex lock/unlock. Spotted by dhill. --- account.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/account.go b/account.go index 12f233c..b7e1a7f 100644 --- a/account.go +++ b/account.go @@ -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)