Add state message print to AcceptBlock failure message.

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).
pull/11406/head
Matt Corallo 7 years ago
parent dc597bb895
commit 6643b80d1c

@ -3189,7 +3189,7 @@ bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<cons
CheckBlockIndex(chainparams.GetConsensus());
if (!ret) {
GetMainSignals().BlockChecked(*pblock, state);
return error("%s: AcceptBlock FAILED", __func__);
return error("%s: AcceptBlock FAILED (%s)", __func__, state.GetDebugMessage());
}
}

Loading…
Cancel
Save