org.ergoplatform.validation.ValidationRules
Check the rule is registered and enabled.
Check the rule is registered and enabled. Since it is easy to forget to register new rule, we need to do this check. But because it is hotspot, we do this check only once for each rule.
Check soft-fork condition.
Check soft-fork condition.
ValidationSettings actualized from blockchain extension sections
id of the rule which raised ValidationException
status of the rule in the blockchain (agreed upon via voting)
arguments of Validation rule with which the rule has risen the exception
true if args
and status
can be interpreted as valid soft-fork condition.
Throws ValidationException with the given cause and args.
Throws ValidationException with the given cause and args. Should be used in all validation rules to unify ValidationException instances which can be thrown (to simplify handling).
For CheckCostFuncOperation we use 1-511 range op codes. Thus
ChangedRule.newValue
should be parsed as a sequence ofgetUShort
values and then the exOpCode should be checked against that parsed sequence. Note, we don't need to store a number of items in a sequence, because at the time of parsing we may assume thatChangedRule.newValue
has correct length, so we just parse it until end of bytes (of cause checking consistency).