Built on #15921. Please review that first.
Removes the fCheckDuplicateInputs argument from CheckTransaction()
The argument is always set to true, since b8f801964f59586508ea8da6cf3decd76bc0e571.
Split CValidationState into TxValidationState and BlockValidationState
to store validation results for transactions and blocks respectively.
Minor style fixups and comment updates.
This is purely a style change. There is no change in behavior.
This is in preparation for the next commit, which removes the useless
`ret` parameter from ValidationState::Invalid().
error() is simply a convenience wrapper that calls LogPrintf and returns
false. Call LogPrintf explicitly and substitute the error() call for a
false bool literal.
ValidationState::Invalid() takes a parameter `ret` which is returned to
the caller. All call sites set this to false. Remove the `ret` parameter
and just return false always.
No callers use the returned value in first_invalid. Remove it from the
function signature and don't set it in the function.
Handle this failure in the same way as all other failures: call Invalid()
with the reasons for the failure.
This is always set to true, since commit
b8f801964f59586508ea8da6cf3decd76bc0e571.