HomePhabricator

[backport#15305] [validation] Crash if disconnecting a block fails

Description

[backport#15305] [validation] Crash if disconnecting a block fails

Summary:
a47df13471e3168e2e02023fb20cdf2414141b36 [qa] Test disconnect block failure -> shutdown (Suhas Daftuar)
4433ed0f730cfd60eeba3694ff3c283ce2c0c8ee [validation] Crash if disconnecting a block fails (Suhas Daftuar)

Pull request description:

If we're unable to disconnect a block during normal operation, then that is a
failure of our local system (such as disk failure) or the chain that we are on
(eg CVE-2018-17144), but cannot be due to failure of the (more work) chain that
we're trying to validate.

We should abort rather than stay on a less work chain.

Fixes #14341.

Backport of Core PR15305

Test Plan:

ninja check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
fanquake <fanquake@gmail.com>Authored on Jul 25 2019, 00:30
majcostaCommitted on Jun 10 2020, 22:03
majcostaPushed on Jun 10 2020, 22:04
Reviewer
Restricted Project
Differential Revision
D6511: [backport#15305] [validation] Crash if disconnecting a block fails
Parents
rABC09741cfffab9: [rpc] expose ability to mock scheduler via the rpc
Branches
Unknown
Tags
Unknown