HomePhabricator

Fix importmulti failure to return rescan errors

Description

Fix importmulti failure to return rescan errors

Summary:
An off-by-one-block bug in importmulti rescan logic could cause it to return
success in an edge case even when a rescan was not successful. The case where
this would happen is if there were multiple blocks in a row with the same
GetBlockTimeMax() value, and the last block was scanned successfully, but one
or more of the earlier blocks was not readable.

This is backport of core's PR10403

Test Plan:

make check

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: teamcity

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

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on May 15 2017, 13:11
deadalnixCommitted on Sep 6 2018, 22:07
deadalnixPushed on Sep 6 2018, 22:07
Reviewer
Restricted Project
Differential Revision
D1725: Fix importmulti failure to return rescan errors
Parents
rABC090127c4042c: Remove init of global config mid-test in miner_tests.cpp
Branches
Unknown
Tags
Unknown