Switch to shiny new fast, RLP-less trie (#795)

* Bump codec

* Fix tests

* Patricia trie builds

* Introduce trie

* Some yak shaving.

* Some fixes

* Remove RLP ref

* Fixes

* It builds!

* Some tests fixed

* Another test fix

* Rejig more hashes

* substrate-trie::iterator_works test

* Update lock

* Polish

* Docs

* Undo incorrect "fix" for tests

* Fix nits
This commit is contained in:
Gav Wood
2018-09-25 15:32:22 +01:00
committed by Arkadiy Paronyan
parent b02c274374
commit 82d6ca3484
90 changed files with 1977 additions and 1129 deletions
+5 -5
View File
@@ -543,11 +543,11 @@ pub mod unhashed {
#[cfg(test)]
mod tests {
use super::*;
use runtime_io::{twox_128, TestExternalities, RlpCodec, with_externalities};
use runtime_io::{twox_128, TestExternalities, with_externalities};
#[test]
fn integers_can_be_stored() {
let mut t = TestExternalities::<_, RlpCodec>::default();
let mut t = TestExternalities::default();
with_externalities(&mut t, || {
let x = 69u32;
put(b":test", &x);
@@ -564,7 +564,7 @@ mod tests {
#[test]
fn bools_can_be_stored() {
let mut t = TestExternalities::<_, RlpCodec>::default();
let mut t = TestExternalities::default();
with_externalities(&mut t, || {
let x = true;
put(b":test", &x);
@@ -582,7 +582,7 @@ mod tests {
#[test]
fn vecs_can_be_retrieved() {
let mut t = TestExternalities::<_, RlpCodec>::default();
let mut t = TestExternalities::default();
with_externalities(&mut t, || {
runtime_io::set_storage(&twox_128(b":test"), b"\x2cHello world");
let x = b"Hello world".to_vec();
@@ -594,7 +594,7 @@ mod tests {
#[test]
fn vecs_can_be_stored() {
let mut t = TestExternalities::<_, RlpCodec>::default();
let mut t = TestExternalities::default();
let x = b"Hello world".to_vec();
with_externalities(&mut t, || {