Allow empty values in the storage (#6364)

* Allow empty values in the storage

* Bump trie-bench

* Bump trie-bench
This commit is contained in:
Arkadiy Paronyan
2020-06-18 09:36:52 +02:00
committed by GitHub
parent a43a755a91
commit f05ae63afa
8 changed files with 53 additions and 16 deletions
@@ -242,7 +242,7 @@ impl<H, N> sp_externalities::ExtensionStore for TestExternalities<H, N> where
#[cfg(test)]
mod tests {
use super::*;
use sp_core::traits::Externalities;
use sp_core::{H256, traits::Externalities};
use sp_runtime::traits::BlakeTwo256;
use hex_literal::hex;
@@ -253,8 +253,8 @@ mod tests {
ext.set_storage(b"doe".to_vec(), b"reindeer".to_vec());
ext.set_storage(b"dog".to_vec(), b"puppy".to_vec());
ext.set_storage(b"dogglesworth".to_vec(), b"cat".to_vec());
const ROOT: [u8; 32] = hex!("555d4777b52e9196e3f6373c556cc661e79cd463f881ab9e921e70fc30144bf4");
assert_eq!(&ext.storage_root()[..], &ROOT);
let root = H256::from(hex!("2a340d3dfd52f5992c6b117e9e45f479e6da5afffafeb26ab619cf137a95aeb8"));
assert_eq!(H256::from_slice(ext.storage_root().as_slice()), root);
}
#[test]