Clean up sr-io (#3609)

* Move trait `Printable` into `sr-primitives`

* Cleanup runtime io trie_root interfaces

* Remove last generic bits from sr-io interface

* Fix srml-sudo after master merge

* Fix benchmarks

* Runtime bump
This commit is contained in:
Bastian Köcher
2019-09-13 16:39:50 +02:00
committed by GitHub
parent 5cb8c0dc1c
commit 45d64a711c
34 changed files with 309 additions and 372 deletions
+3 -4
View File
@@ -118,10 +118,10 @@ use safe_mix::TripletMix;
use codec::{Encode, Decode};
#[cfg(any(feature = "std", test))]
use runtime_io::{TestExternalities, Blake2Hasher};
use runtime_io::TestExternalities;
#[cfg(any(feature = "std", test))]
use primitives::ChangesTrieConfiguration;
use primitives::{ChangesTrieConfiguration, Blake2Hasher};
pub mod offchain;
@@ -151,8 +151,7 @@ pub fn extrinsics_root<H: Hash, E: codec::Encode>(extrinsics: &[E]) -> H::Output
/// Compute the trie root of a list of extrinsics.
pub fn extrinsics_data_root<H: Hash>(xts: Vec<Vec<u8>>) -> H::Output {
let xts = xts.iter().map(Vec::as_slice).collect::<Vec<_>>();
H::ordered_trie_root(&xts)
H::ordered_trie_root(xts)
}
pub trait Trait: 'static + Eq + Clone {