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
+4 -3
View File
@@ -67,8 +67,8 @@ pub use self::storage::{StorageValue, StorageMap, StorageLinkedMap, StorageDoubl
pub use self::hashable::Hashable;
pub use self::dispatch::{Parameter, Callable, IsSubType};
pub use self::double_map::StorageDoubleMapWithHasher;
pub use runtime_io::{print, storage_root, Printable};
pub use sr_primitives::{self, ConsensusEngineId};
pub use runtime_io::storage_root;
pub use sr_primitives::{self, ConsensusEngineId, print, traits::Printable};
/// Macro for easily creating a new implementation of the `Get` trait. Use similarly to
/// how you would declare a `const`:
@@ -270,7 +270,8 @@ pub use serde::{Serialize, Deserialize};
mod tests {
use super::*;
use codec::Codec;
use runtime_io::{with_externalities, Blake2Hasher};
use runtime_io::with_externalities;
use primitives::Blake2Hasher;
pub use srml_metadata::{
DecodeDifferent, StorageEntryMetadata, StorageMetadata, StorageEntryType,
StorageEntryModifier, DefaultByte, DefaultByteGetter, StorageHasher
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
use runtime_io::{with_externalities, Blake2Hasher};
use runtime_io::with_externalities;
use primitives::Blake2Hasher;
use support::{StorageValue, StorageMap, StorageLinkedMap, StorageDoubleMap};
use support::storage::unhashed;
use codec::{Encode, Decode};
@@ -15,7 +15,7 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
#![recursion_limit="128"]
use runtime_io::{with_externalities, Blake2Hasher};
use runtime_io::with_externalities;
use support::{
Parameter, traits::Get, parameter_types,
sr_primitives::{generic, BuildStorage, traits::{BlakeTwo256, Block as _, Verify}},
@@ -28,7 +28,7 @@ use support::{
use inherents::{
ProvideInherent, InherentData, InherentIdentifier, RuntimeString, MakeFatalError
};
use primitives::{H256, sr25519};
use primitives::{H256, sr25519, Blake2Hasher};
mod system;