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).
This commit is contained in:
Matt Corallo 2017-09-26 16:23:41 -04:00
parent dc597bb895
commit 6643b80d1c

View file

@ -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());
}
}