mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-09-01 09:45:14 +00:00
wallet: only log block batch if non-empty
This fixes an issue reputed by a user that would cause btcwallet to panic if the full node was stopped while btcwallet was still restoring the wallet.
This commit is contained in:
parent
b51c1adeee
commit
b9da1fbd8d
1 changed files with 4 additions and 2 deletions
|
@ -732,8 +732,10 @@ func (w *Wallet) recovery(startHeight int32) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("Recovered addresses from blocks %d-%d", blockBatch[0].Height,
|
if len(blockBatch) > 0 {
|
||||||
blockBatch[len(blockBatch)-1].Height)
|
log.Infof("Recovered addresses from blocks %d-%d", blockBatch[0].Height,
|
||||||
|
blockBatch[len(blockBatch)-1].Height)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue