2908 | @@ -2909,13 +2909,11 @@ bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool f
2909 | {
2910 | // Check proof of work matches claimed amount
2911 | if (fCheckPOW && !CheckProofOfWork(block.GetHash(), block.nBits, Params().GetConsensus()))
2912 | - return state.DoS(50, error("CheckBlockHeader(): proof of work failed"),
2913 | - REJECT_INVALID, "high-hash");
2914 | + return state.DoS(50, false, REJECT_INVALID, "high-hash");
Not sure if it makes sense in this case, depends on whether the extra explanation offered is worthwhile, but instead of deleting the error message here you could pass it to DoS as strDebugMessage. That's why that field was introduced.
Sure, I can set that field wherever we think it's valuable. Please, point out the cases where you think it's worth it and I'll happily change it.
I do think the old messages in all these cases are more informative than the two-word codes, which are documented nowhere.
In all cases? I think I disagree, but I don't care enough to discuss it, I'll change all of them to use all the long messages.
The non-documented codes can be grep, but I think at some point we could just use ConsensusError_t that could replace ScriptError_t. Anyway, one step at a time...