| 66 | } |
| 67 | |
| 68 | fn compare(hint_out: &DataType, claimed_assertions: &mut Option<Vec<HashBytes>>) -> Option<bool> { |
| 69 | if claimed_assertions.is_none() { |
| 70 | return None; |
| 71 | } |
| 72 | assert!(!hint_out.output_is_field_element()); |
| 73 | |
| 74 | let hint_out_hash = hint_out.to_hash(); |
| 75 | let matches = if let CompressedStateObject::Hash(hash) = hint_out_hash { |
| 76 | if let Some(claimed_assertions) = claimed_assertions { |
| 77 | claimed_assertions.pop().unwrap() == hash |
| 78 | } else { |
| 79 | unreachable!(); // verified that claimed_assertions is_some() |
| 80 | } |
| 81 | } else { |
| 82 | unreachable!(); // verified that hint_out is hash above |
| 83 | }; |
| 84 | |
| 85 | Some(matches) |
| 86 | } |
| 87 | |
| 88 | pub(crate) fn groth16_generate_segments( |
| 89 | skip_evaluation: bool, |