Purge remaining last_id (now called block_hash)

This commit is contained in:
Michael Vines
2019-03-02 10:09:09 -08:00
committed by Greg Fitzgerald
parent 2bfad87a5f
commit 258cf21416
39 changed files with 369 additions and 369 deletions

View File

@@ -44,15 +44,15 @@ fn bench_sigs_bloom(bencher: &mut Bencher) {
// 1M TPS * 1s (length of block in sigs) == 1M items in filter
// 1.0E-8 false positive rate
// https://hur.st/bloomfilter/?n=1000000&p=1.0E-8&m=&k=
let last_id = hash(Hash::default().as_ref());
// eprintln!("last_id = {:?}", last_id);
let block_hash = hash(Hash::default().as_ref());
// eprintln!("block_hash = {:?}", block_hash);
let keys = (0..27)
.into_iter()
.map(|i| last_id.hash_at_index(i))
.map(|i| block_hash.hash_at_index(i))
.collect();
let mut sigs: Bloom<Signature> = Bloom::new(38_340_234, keys);
let mut id = last_id;
let mut id = block_hash;
let mut falses = 0;
let mut iterations = 0;
bencher.iter(|| {
@@ -76,11 +76,11 @@ fn bench_sigs_bloom(bencher: &mut Bencher) {
#[ignore]
fn bench_sigs_hashmap(bencher: &mut Bencher) {
// same structure as above, new
let last_id = hash(Hash::default().as_ref());
// eprintln!("last_id = {:?}", last_id);
let block_hash = hash(Hash::default().as_ref());
// eprintln!("block_hash = {:?}", block_hash);
let mut sigs: HashSet<Signature> = HashSet::new();
let mut id = last_id;
let mut id = block_hash;
let mut falses = 0;
let mut iterations = 0;
bencher.iter(|| {