wallet: ensure rescan is launched with all addresses
During the time of initial block hash catch-up, it is possible to request an address be generated. This commit updates the active addresses by calling `w.activeData` after the catch-up is complete.
This commit is contained in:
parent
5113a64617
commit
5c69110f47
1 changed files with 13 additions and 0 deletions
|
@ -453,6 +453,19 @@ func (w *Wallet) syncWithChain() error {
|
|||
return err
|
||||
}
|
||||
log.Info("Done catching up block hashes")
|
||||
|
||||
// Since we've spent some time catching up block hashes, we
|
||||
// might have new addresses waiting for us that were requested
|
||||
// during initial sync. Make sure we have those before we
|
||||
// request a rescan later on.
|
||||
err = walletdb.View(w.db, func(dbtx walletdb.ReadTx) error {
|
||||
var err error
|
||||
addrs, unspent, err = w.activeData(dbtx)
|
||||
return err
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Compare previously-seen blocks against the chain server. If any of
|
||||
|
|
Loading…
Reference in a new issue