Browse Source

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).
0.16
Matt Corallo 7 years ago
parent
commit
6643b80d1c
  1. 2
      src/validation.cpp

2
src/validation.cpp

@ -3189,7 +3189,7 @@ bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<cons @@ -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