MCPcopy Create free account
hub / github.com/docknetwork/crypto / validate_bounds

Function validate_bounds

proof_system/src/sub_protocols/mod.rs:191–196  ·  view source on GitHub ↗
(min: u64, max: u64)

Source from the content-addressed store, hash-verified

189}
190
191pub fn validate_bounds(min: u64, max: u64) -> Result<(), ProofSystemError> {
192 if max <= min {
193 return Err(ProofSystemError::BoundCheckMaxNotGreaterThanMin);
194 }
195 Ok(())
196}
197
198pub fn enforce_and_get_u64<F: PrimeField>(val: &F) -> Result<u64, ProofSystemError> {
199 let m = val.into_bigint();

Calls

no outgoing calls

Tested by

no test coverage detected