HomePhabricator

Merge #11406: Add state message print to AcceptBlock failure message.

Description

Merge #11406: Add state message print to AcceptBlock failure message.

Summary:
6643b80 Add state message print to AcceptBlock failure message. (Matt Corallo)

Pull request description:

This should make it easier to debug issues where the CheckBlock at
the top of ProcessNewBlock fails (which does not print, in contrast
to AcceptBlock, which always prints).

This was motivated by #11371 which appears to be exactly such a case, and is not debuggable from the information provided. Not sure how much this would have helped in that case, but it is kinda weird that we can reject a block without ever printing why.

Tree-SHA512: 7a1c2c76080b810212da885c38e091609e409c62918cc326bb36a1096e09b2ae7e26fd4bdaefd79863d2894e2823e463005700a524940f177a59ef09f589b2f1

Backport of Core PR11406
https://github.com/bitcoin/bitcoin/pull/11406/files

Test Plan:

# on master
test_runner.py --nocleanup

grep -rni "acceptblock fail" /tmp/<bitcoin-temp-dir>
# example error:
ERROR: ProcessNewBlock: AcceptBlock FAILED

# with this patch
make check
test_runner.py

grep -rni "acceptblock fail" /tmp/<bitcoin-temp-dir>
# example error:
ERROR: ProcessNewBlock: AcceptBlock FAILED (Transaction order is invalid (01fc91cfedbea4a49c943158746de0467801cd24594139c8482ce976f3ed6101 < ce56a7306a2c9b1a6a7ecb8a31f17883023f3d224e1b09c2709ba8dca5dae53c))

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Oct 4 2017, 12:35
jasonbcoxCommitted on Jun 5 2019, 16:23
jasonbcoxPushed on Jun 5 2019, 16:23
Reviewer
Restricted Project
Differential Revision
D3211: Merge #11406: Add state message print to AcceptBlock failure message.
Parents
rABC5b2438c3fc11: Remove useless priority calculation in wallet
Branches
Unknown
Tags
Unknown