Pruning changes trie without digests (#952)

* pruning changes tries without digests

* u64::max_value()
This commit is contained in:
Svyatoslav Nikolsky
2018-11-17 20:04:53 +03:00
committed by Gav Wood
parent 5b28147d27
commit 6f9a505fba
30 changed files with 257 additions and 315 deletions
-3
View File
@@ -29,6 +29,3 @@ srml-timestamp = { path = "../../srml/timestamp" }
srml-treasury = { path = "../../srml/treasury" }
srml-contract = { path = "../../srml/contract" }
wabt = "0.4"
[features]
benchmarks = []
-22
View File
@@ -17,14 +17,10 @@
//! A `CodeExecutor` specialisation which uses natively compiled runtime when the wasm to be
//! executed is equivalent to the natively compiled code.
#![cfg_attr(feature = "benchmarks", feature(test))]
extern crate node_runtime;
#[macro_use] extern crate substrate_executor;
#[cfg_attr(test, macro_use)] extern crate substrate_primitives as primitives;
#[cfg(feature = "benchmarks")] extern crate test;
#[cfg(test)] extern crate substrate_keyring as keyring;
#[cfg(test)] extern crate sr_primitives as runtime_primitives;
#[cfg(test)] extern crate srml_support as runtime_support;
@@ -234,12 +230,10 @@ mod tests {
transfer_fee: 0,
creation_fee: 0,
reclaim_rebate: 0,
_genesis_phantom_data: Default::default(),
}),
session: Some(SessionConfig {
session_length: 2,
validators: vec![One.to_raw_public().into(), Two.to_raw_public().into(), three],
_genesis_phantom_data: Default::default(),
}),
staking: Some(StakingConfig {
sessions_per_era: 2,
@@ -253,7 +247,6 @@ mod tests {
current_offline_slash: 0,
current_session_reward: 0,
offline_slash_grace: 0,
_genesis_phantom_data: Default::default(),
}),
democracy: Some(Default::default()),
council_seats: Some(Default::default()),
@@ -751,19 +744,4 @@ mod tests {
assert!(t.storage_changes_root(Default::default(), 0).is_some());
}
#[cfg(feature = "benchmarks")]
mod benches {
use super::*;
use test::Bencher;
#[bench]
fn wasm_execute_block(b: &mut Bencher) {
b.iter(|| {
let mut t = new_test_ext(false);
WasmExecutor::new().call(&mut t, 8, COMPACT_CODE, "execute_block", &block1(false).0).unwrap();
WasmExecutor::new().call(&mut t, 8, COMPACT_CODE, "execute_block", &block2().0).unwrap();
});
}
}
}