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

Method check_validity_and_keep_element

bitvm/src/bn254/fp254impl.rs:560–567  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Implementers 2

fr.rsbitvm/src/bn254/fr.rs
fq.rsbitvm/src/bn254/fq.rs

Calls

no outgoing calls

Tested by

no test coverage detected