HomePhabricator

Do not unlock cs_main in ABC unless we've actually made progress.

Description

Do not unlock cs_main in ABC unless we've actually made progress.

Summary:
Technically, some internal datastructures may be in an inconsistent
state if we do this, though there are no known bugs there. Still,
for future safety, its much better to only unlock cs_main if we've
made progress (not just tried a reorg which may make progress).

This is extracted from Core PR13023 : https://github.com/bitcoin/bitcoin/pull/13023/commits/ecc3c4a019e6db30e208b8554b1a3658dcb9a80a

Test Plan:

make check

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Matt Corallo <git@bluematt.me>Authored on Oct 9 2017, 15:19
deadalnixCommitted on Jun 28 2019, 14:06
deadalnixPushed on Jun 28 2019, 14:06
Reviewer
Restricted Project
Differential Revision
D3435: Do not unlock cs_main in ABC unless we've actually made progress.
Parents
rABCe0856fd24ff6: Do not permit copying FastRandomContexts
Branches
Unknown
Tags
Unknown