Skip to content

Commit e12522d

Browse files
committed
Merge #11406: Add state message print to AcceptBlock failure message.
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
2 parents a4c833f + 6643b80 commit e12522d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3192,7 +3192,7 @@ bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<cons
31923192
CheckBlockIndex(chainparams.GetConsensus());
31933193
if (!ret) {
31943194
GetMainSignals().BlockChecked(*pblock, state);
3195-
return error("%s: AcceptBlock FAILED", __func__);
3195+
return error("%s: AcceptBlock FAILED (%s)", __func__, state.GetDebugMessage());
31963196
}
31973197
}
31983198

0 commit comments

Comments
 (0)