Closed scravy closed 5 years ago
But BlockValidationResult seems to be one step away from being replaced by enum.
@Nizametdinov I am planning to have ValidationError
from validation_error.cpp
, BlockValidationResult
, and BlockValidationError
merged in one class; but for now I did not go that far as I have a series of dependent pull requests (to come). Also this pull requests mostly deals with the change from set to early return one error only and I would like to keep the changeset to it.
Concept ACK 468283980c1ceff5c9b3b291658dae2ada659b16
This changes
BlockValidationResult
from hosting a set of validation errors to just carry one validation error and always short circuit / return early on validation errors.This was already suggested during the initial review of this by @kostyantyn
Some things that follow: Some tests had to be set up a bit differently as previously multiple things could fail, now the first thing fails and some fixtures were not mocked accordingly. This fixes that.
Cosmetic changes:
auto
in favor of proper types in testsBOOST_CHECK_MESSAGE
instead ofBOOST_CHECK
for better debuggingSigned-off-by: Julian Fleischer julian@thirdhash.com