MCPcopy Create free account
hub / github.com/BitVM/BitVM / check_validity

Method check_validity

bitvm/src/bigint/std.rs:346–359  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

344 }
345
346 pub fn check_validity() -> Script {
347 script! { // a0 a1 ... an
348 { 1 << LIMB_SIZE } // a0 a1 ... an x
349 for _ in 0..Self::N_LIMBS-2 { // a x
350 OP_TUCK // x a x
351 0 OP_SWAP // x a 0 x
352 OP_WITHIN OP_VERIFY // x
353 } // a0 a1 x
354 0 OP_SWAP // a0 a1 0 x
355 OP_WITHIN OP_VERIFY // a0
356 0 { Self::HEAD_OFFSET } // a0 0 y
357 OP_WITHIN OP_VERIFY
358 }
359 }
360
361 /// Resize positive numbers
362 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected