Light friendly storage tracking: changes trie + extending over ranges (#628)

* changes_trie

* changs_trie: continue

* changes_trie: adding tests

* fixed TODO

* removed obsolete ExtrinsicChanges

* encodable ChangesTrieConfiguration

* removed polkadot fle

* fixed grumbles

* ext_storage_changes_root returns u32

* moved changes trie root to digest

* removed commented code

* read storage values from native code

* fixed grumbles

* fixed grumbles

* missing comma
This commit is contained in:
Svyatoslav Nikolsky
2018-09-18 10:14:41 +03:00
committed by Gav Wood
parent 24479cd7f5
commit 7fa337afbc
64 changed files with 3130 additions and 788 deletions
+5 -4
View File
@@ -16,11 +16,11 @@
use double_map::StorageDoubleMap;
use runtime_io::with_externalities;
use runtime_primitives::testing::{Digest, H256, Header};
use runtime_primitives::testing::{Digest, DigestItem, H256, Header};
use runtime_primitives::traits::{BlakeTwo256};
use runtime_primitives::BuildStorage;
use runtime_support::StorageMap;
use substrate_primitives::Blake2Hasher;
use substrate_primitives::{Blake2Hasher, RlpCodec};
use wabt;
use {
runtime_io, balances, system, CodeOf, ContractAddressFor,
@@ -43,6 +43,7 @@ impl system::Trait for Test {
type AccountId = u64;
type Header = Header;
type Event = ();
type Log = DigestItem;
}
impl balances::Trait for Test {
type Balance = u64;
@@ -105,7 +106,7 @@ impl ExtBuilder {
self.creation_fee = creation_fee;
self
}
fn build(self) -> runtime_io::TestExternalities<Blake2Hasher> {
fn build(self) -> runtime_io::TestExternalities<Blake2Hasher, RlpCodec> {
let mut t = system::GenesisConfig::<Test>::default()
.build_storage()
.unwrap();
@@ -132,7 +133,7 @@ impl ExtBuilder {
}.build_storage()
.unwrap(),
);
t.into()
runtime_io::TestExternalities::new(t)
}
}