This removes the always-false return argument, and splits the DoS responsibility across, ::Invalid, and ::Corrupt which together encode the possiblyCorrupt argument into a method-level concern. This makes the interface more explicit by making this literal argument self-explanatory, and by not separating the message strings.
Rationalize the CValidationState interface by splitting ::DoS across ::Invalid and ::Corrupt #12357
pull Empact wants to merge 5 commits into bitcoin:master from Empact:validation-state-corrupt changing 3 files +115 −102-
Empact commented at 3:58 PM on February 5, 2018: member
-
Empact commented at 4:36 PM on February 5, 2018: member
Looks like they are compatible, but whichever is second would need to be rebased / adapted.
-
1a6ead3d53
Drop return argument from CValidationState::Invalid
It's false in every case.
-
d754cc953e
Drop return argument from CValidationState::DoS
It was always false. Note error() always returns false.
-
Drop unused default arguments to CValidationState::DoS and ::Invalid 5e48f5687b
-
Make the level explicit for CValidationState::Invalid 32005810b2
-
6d4d5f7461
Introduce CValidationState::Corrupt and privatize ::DoS
::Invalid, and ::Corrupt together encode the possiblyCorrupt argument into a method-level concern. This makes the interface more explicit by making this literal argument self-explanatory, and by not separating the message strings.
- Empact force-pushed on Feb 5, 2018
- fanquake added the label Refactoring on Feb 5, 2018
- fanquake added the label Validation on Feb 5, 2018
-
JeremyRubin commented at 4:03 AM on February 7, 2018: contributor
This is a subset of changes made in #11523.
I can rebase it if there's any demand for that work (it seemed not to be the case?)
-
Empact commented at 7:23 AM on February 7, 2018: member
Ah thanks Jeremy, didn’t see yours. Agree there are some clear improvements to be made here. I’ll leave this open and comment on yours.
- Empact closed this on Feb 16, 2018
- Empact deleted the branch on Feb 16, 2018
- MarcoFalke locked this on Sep 8, 2021
Contributors
Labels