From 45ee74868a10840513ac78dcd01c843324b35e06 Mon Sep 17 00:00:00 2001 From: debris Date: Fri, 11 Dec 2015 11:53:44 +0100 Subject: [PATCH] fixed trie benches --- benches/trie.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/benches/trie.rs b/benches/trie.rs index c12a8f752..65df58309 100644 --- a/benches/trie.rs +++ b/benches/trie.rs @@ -54,7 +54,8 @@ fn trie_insertions_six_high(b: &mut Bencher) { b.iter(||{ let mut memdb = MemoryDB::new(); - let mut t = TrieDB::new(&mut memdb); + let mut root = H256::new(); + let mut t = TrieDB::new(&mut memdb, &mut root); for i in d.iter() { t.insert(&i.0, &i.1); } @@ -88,7 +89,8 @@ fn trie_insertions_six_mid(b: &mut Bencher) { } b.iter(||{ let mut memdb = MemoryDB::new(); - let mut t = TrieDB::new(&mut memdb); + let mut root = H256::new(); + let mut t = TrieDB::new(&mut memdb, &mut root); for i in d.iter() { t.insert(&i.0, &i.1); } @@ -124,7 +126,8 @@ fn trie_insertions_random_mid(b: &mut Bencher) { b.iter(||{ let mut memdb = MemoryDB::new(); - let mut t = TrieDB::new(&mut memdb); + let mut root = H256::new(); + let mut t = TrieDB::new(&mut memdb, &mut root); for i in d.iter() { t.insert(&i.0, &i.1); } @@ -160,7 +163,8 @@ fn trie_insertions_six_low(b: &mut Bencher) { b.iter(||{ let mut memdb = MemoryDB::new(); - let mut t = TrieDB::new(&mut memdb); + let mut root = H256::new(); + let mut t = TrieDB::new(&mut memdb, &mut root); for i in d.iter() { t.insert(&i.0, &i.1); }