There is only two callers of ContextualCheckBlock, and they already print errors:
https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L3780 https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L3689
There is only two callers of ContextualCheckBlock, and they already print errors:
https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L3780 https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L3689
ACK e7ad8a7
3572 | @@ -3573,11 +3573,11 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn 3573 | // already does not permit it, it is impossible to trigger in the 3574 | // witness tree. 3575 | if (block.vtx[0].wit.vtxinwit.size() != 1 || block.vtx[0].wit.vtxinwit[0].scriptWitness.stack.size() != 1 || block.vtx[0].wit.vtxinwit[0].scriptWitness.stack[0].size() != 32) { 3576 | - return state.DoS(100, error("%s : invalid witness nonce size", __func__), REJECT_INVALID, "bad-witness-nonce-size", true); 3577 | + return state.DoS(100, false, REJECT_INVALID, "bad-witness-nonce-size", true, strprintf("%s : invalid witness nonce size", __func__));
I'm not sure if it's worth keeping the func but I'm not against it.
Agree with removing. I don't think function names are very useful to most debug.log readers, and to those that are, you can just grep the source code for the message. Though perhaps we should do a combined effort of fixing it everywhere. ACK with or without func
ACK e7ad8a7
Needs rebase
utACK (with or without func), but needs rebase.
rebased