Prevent full handshake rescans on btcd reconnect.

If a rescan fails (for example, due to a disconnected btcd) in the
btcd handshake, the last block height from a rescanprogress
notification should be used for the next rescan job on next wallet
connect.  Previously, this rescan would always start at the earliest
block height for any wallet address if the transaction store could not
be read at wallet startup.  This change unsets the boolean flag which
would cause a full rescan at next connect when a rescan progress
notification is received and a partial sync height is written.

Fixes #87.
This commit is contained in:
Josh Rickmar 2014-05-30 10:25:32 -05:00
parent 733677433d
commit 2c3845bbbd

View file

@ -394,6 +394,7 @@ func (am *AccountManager) rescanListener() {
continue
}
}
acct.fullRescan = false
am.ds.ScheduleWalletWrite(acct)
err := am.ds.FlushAccount(acct)
if err != nil {