Problem
Previously, the guard for an epoch of zero wasn't triggering as the return value of the cabinet was of type BigNumber and the number comparison to 0 would never trigger due to not being of type number.
Solution
This PR correctly handles the bignumber to number marshalling and guards against out-of-range conditions. As there is an interface requirement for the cabinet to be set if the order is of start mining time type, any order that doesn't meet this is requirement is automatically removed from the watch-tower.
coverage: 79.051% (+0.6%) from 78.445% when pulling 9445824c4d1de0b5830cec0e0dc14b7a57844dc0 on enforce-interface into 8652d2f7d39127dc5bc7277f2ce6c2356dda3bd0 on main.
Problem Previously, the guard for an
epoch
of zero wasn't triggering as the return value of the cabinet was of typeBigNumber
and thenumber
comparison to0
would never trigger due to not being of typenumber
.Solution This PR correctly handles the bignumber to number marshalling and guards against out-of-range conditions. As there is an interface requirement for the cabinet to be set if the order is of start mining time type, any order that doesn't meet this is requirement is automatically removed from the watch-tower.