Revert "wallet: rescan 2 days past the birthday block"

This reverts commit af82460075.

The 48-hour margin has been set in the waddrmgr.Create() right before
written to the databasw.
This commit is contained in:
Roy Lee 2022-09-13 10:38:25 -07:00
parent af82460075
commit 036304ac53
2 changed files with 5 additions and 8 deletions

View file

@ -480,9 +480,7 @@ func birthdaySanityCheck(chainConn chainConn,
// Otherwise, we'll attempt to locate a better one now that we have
// access to the chain.
// To be on the safe side, scan 2 days past of the actual timestamp.
bday := birthdayTimestamp.Add(48 * time.Hour)
newBirthdayBlock, err := locateBirthdayBlock(chainConn, bday)
newBirthdayBlock, err := locateBirthdayBlock(chainConn, birthdayTimestamp)
if err != nil {
return nil, err
}

View file

@ -371,11 +371,10 @@ func (w *Wallet) syncWithChain(birthdayStamp *waddrmgr.BlockStamp) error {
// If we've yet to find our birthday block, we'll do so now.
if birthdayStamp == nil {
// To be on the safe side, scan 2 days past of the actual
// timestamp.
bday := w.Manager.Birthday().Add(48 * time.Hour)
birthdayStamp, err = locateBirthdayBlock(chainClient, bday)
var err error
birthdayStamp, err = locateBirthdayBlock(
chainClient, w.Manager.Birthday(),
)
if err != nil {
return fmt.Errorf("unable to locate birthday block: %v",
err)