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