Skip to content

Commit

Permalink
Add state message print to AcceptBlock failure message.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
TheBlueMatt committed Sep 26, 2017
1 parent dc597bb commit 6643b80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down

0 comments on commit 6643b80

Please sign in to comment.