Calculates the modulo 16 of the u4 at the top of the stack, parameters being internal values
(current: u32, limit: u32)
| 119 | |
| 120 | /// Calculates the modulo 16 of the u4 at the top of the stack, parameters being internal values |
| 121 | pub fn u4_add_nested(current: u32, limit: u32) -> Script { |
| 122 | script! { |
| 123 | OP_DUP |
| 124 | OP_16 |
| 125 | OP_GREATERTHANOREQUAL |
| 126 | OP_IF |
| 127 | OP_16 |
| 128 | OP_SUB |
| 129 | if current + 1 < limit { |
| 130 | { u4_add_nested(current + 1, limit)} |
| 131 | } |
| 132 | OP_ENDIF |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | /// Addition of zipped numbers consisting of nibble_count u4's, without the table |
| 137 | pub fn u4_add_no_table_internal(nibble_count: u32, number_count: u32) -> Script { |
no outgoing calls
no test coverage detected