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:
parent
dc597bb895
commit
6643b80d1c
1 changed files with 1 additions and 1 deletions
|
@ -3189,7 +3189,7 @@ bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<cons
|
||||||
CheckBlockIndex(chainparams.GetConsensus());
|
CheckBlockIndex(chainparams.GetConsensus());
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
GetMainSignals().BlockChecked(*pblock, state);
|
GetMainSignals().BlockChecked(*pblock, state);
|
||||||
return error("%s: AcceptBlock FAILED", __func__);
|
return error("%s: AcceptBlock FAILED (%s)", __func__, state.GetDebugMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue