validate_rule
Checks that the rule is sensible. This means that the rule does not expect:
block height or timestamp to be negative
op_countto be zero or negative
It also rejects op_count rules with operators that are not lt or le.
Throws "INVALID RULE" if:
the rule variable is
block_heightand the value is less than 0the rule variable is
block_timeand the value is less than 0the rule variable is
block_heightand the operator is neither ofltandlethe rule variable is
op_countbut the requirement would never be satisfied, i.e.:op_count,lt, any value below twoop_count,le, any value below one
The first authentication attempt will be checked against an op_count value of 1, not 0.
Parameters
rule
the rule to check