HomePhabricator

Fix importwallet edge case rescan bug

Description

Fix importwallet edge case rescan bug

Summary:
Start importwallet rescans at the first block with timestamp greater or equal
to the wallet birthday instead of the last block with timestamp less or equal.
This fixes an edge case bug where importwallet could fail to start the rescan
early enough if there are blocks with decreasing timestamps or multiple blocks
with the same timestamp.

Backport of core's PR10410

Test Plan:

make check
./test/functional/test_runner.py

Reviewers: schancel, #bitcoin_abc, dagurval

Reviewed By: #bitcoin_abc, dagurval

Differential Revision: https://reviews.bitcoinabc.org/D945

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on May 16 2017, 15:34
deadalnixCommitted on Jan 15 2018, 11:33
deadalnixPushed on Jan 15 2018, 11:33
Reviewer
Restricted Project
Differential Revision
D945: Fix importwallet edge case rescan bug
Parents
rABC8116014ce181: Remove redundant parameter params of EncodeDestination
Branches
Unknown
Tags
Unknown

Event Timeline