Carries out some remaining tidy-ups remaining after PR 15141:
- split ValidationState into TxValidationState and BlockValidationState (commit from ajtowns)
- various minor code style tidy-ups to the ValidationState class
- remove the useless
ret
parameter fromValidationState::Invalid()
- remove the now unused
first_invalid
parameter fromProcessNewBlockHeaders()
- remove the
fMissingInputs
parameter fromAcceptToMemoryPool()
, and deal with missing inputs the same way as other errors by using theTxValidationState
object.
Tip for reviewers (thanks ryanofsky!): The first commit ("[validation] Add CValidationState subclasses" ) is huge and can be easier to start reviewing if you revert the rote, mechanical changes:
Substitute the commit hash of commit “[validation] Add CValidationState subclasses” for in the commands below.
0git checkout <CommitHash>
1git grep -l ValidationState | xargs sed -i 's/BlockValidationState\|TxValidationState/CValidationState/g'
2git grep -l ValidationResult | xargs sed -i 's/BlockValidationResult\|TxValidationResult/ValidationInvalidReason/g'
3git grep -l MaybePunish | xargs sed -i 's/MaybePunishNode\(ForBlock\|ForTx\)/MaybePunishNode/g'
4git diff HEAD^
After that it’s possible to easily see the mechanical changes with:
0git log -p -n1 -U0 --word-diff-regex=. <CommitHash>