()
| 558 | } |
| 559 | |
| 560 | fn check_validity_and_keep_element() -> Script { |
| 561 | script! { |
| 562 | { Self::check_validity() } |
| 563 | for _ in 0..Self::N_LIMBS { |
| 564 | OP_FROMALTSTACK |
| 565 | } |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | // finds if the element at the top of the stack is less than the modulo and valid (limbs are in range) |
| 570 | // consumes the element, leaves the result at the topstack |