()
| 165 | |
| 166 | #[test] |
| 167 | fn test_mmr_native() { |
| 168 | let mut mmr = MMRNative::new(); |
| 169 | let mut leaves = vec![]; |
| 170 | |
| 171 | for i in 0..42 { |
| 172 | let leaf = [i as u8; 32]; |
| 173 | leaves.push(leaf); |
| 174 | |
| 175 | mmr.append(leaf); |
| 176 | |
| 177 | for j in 0..=i { |
| 178 | let (leaf, mmr_proof) = mmr.generate_proof(j); |
| 179 | assert!(mmr.verify_proof(leaf, &mmr_proof)); |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | #[test] |
| 185 | fn test_mmr_crosscheck() { |
nothing calls this directly
no test coverage detected