Skip to content

Commit

Permalink
Remove invalid test (impossible to implement without violating safety…
Browse files Browse the repository at this point in the history
… requirements)
  • Loading branch information
Dzejkop committed Apr 11, 2024
1 parent d393978 commit 6e626ed
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions src/cascading_merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1093,43 +1093,6 @@ mod tests {
tree.validate().unwrap();
}

// TODO: This test is breaking safety guarantees
// #[test]
// #[serial]
// fn test_mmap() {
// let leaves = vec![3; 3];
// let empty = 1;
// let tempfile = tempfile::tempfile().unwrap();
// let mmap_vec: MmapVec<_> = unsafe { MmapVec::new(tempfile).unwrap() };

// let mut tree = CascadingMerkleTree::<TestHasher,
// MmapVec<_>>::with_leaves( mmap_vec,
// 20,
// &empty,
// &leaves,
// );
// debug_tree(&tree);
// tree.validate().unwrap();

// for _ in 0..100 {
// tree.push(3).unwrap();
// debug_tree(&tree);
// tree.validate().unwrap();

// let restored = unsafe {
// CascadingMerkleTree::<TestHasher, MmapVec<_>>::restore(
//
// MmapTreeStorageConfig::new(PathBuf::from("target/test.mmap")),
// 20,
// &empty,
// )
// .unwrap()
// };
// restored.validate().unwrap();
// assert_eq!(tree, restored);
// }
// }

#[test]
fn test_vec_realloc_speed() {
let empty = 0;
Expand Down

0 comments on commit 6e626ed

Please sign in to comment.