Remove flaky merkle timing test (#8602)

This commit is contained in:
sakridge 2020-03-03 19:26:38 -08:00 committed by GitHub
parent 1cb6101c6a
commit 63ed892502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 19 deletions

View File

@ -280,25 +280,6 @@ mod tests {
}
}
#[test]
fn test_node_capacity_constant_time() {
use std::time::Instant;
// trigger function invoking optimize once
MerkleTree::calculate_vec_capacity(2);
// record time spending
let mut time_record = Instant::now();
MerkleTree::calculate_vec_capacity(4);
let small_leaf_count_duration = time_record.elapsed();
time_record = Instant::now();
MerkleTree::calculate_vec_capacity(65536);
let large_leaf_count_duration = time_record.elapsed();
// large leafs should not bring time inceasing
assert!(large_leaf_count_duration < 2 * small_leaf_count_duration);
}
#[test]
#[should_panic]
fn test_proof_entry_instantiation_both_clear() {