Normalize Crate Names in SRML/Node Template (#3543)

* Fix some instances of `runtime-io`

* Patch a bunch

* More patches for consistancy

* more patch

* Fix various build issues

* Fix tests

* Patch `srml-support-*` crates

* Fix doc tests

* Revert "Fix doc tests"

This reverts commit ba2ec61da7acc36821a70e76a31a6a5bf13bbe95.

* Revert "Patch `srml-support-*` crates"

This reverts commit 9a6070450107dec17784ba34af4b871023f6dc81.

* Missed one

* Fix doc tests
This commit is contained in:
Shawn Tabrizi
2019-09-04 14:44:28 +02:00
committed by GitHub
parent 875fa73728
commit c284ca2138
84 changed files with 246 additions and 250 deletions
+4 -4
View File
@@ -10,10 +10,10 @@ safe-mix = { version = "1.0", default-features = false}
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
runtime-io ={ package = "sr-io", path = "../../core/sr-io", default-features = false }
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
sr-version = { path = "../../core/sr-version", default-features = false }
srml-support = { path = "../support", default-features = false }
support = { package = "srml-support", path = "../support", default-features = false }
[dev-dependencies]
criterion = "0.2"
@@ -26,8 +26,8 @@ std = [
"codec/std",
"primitives/std",
"rstd/std",
"runtime_io/std",
"srml-support/std",
"runtime-io/std",
"support/std",
"sr-primitives/std",
"sr-version/std",
]
+2 -2
View File
@@ -16,7 +16,7 @@
use criterion::{Criterion, criterion_group, criterion_main, black_box};
use srml_system as system;
use srml_support::{decl_module, decl_event, impl_outer_origin, impl_outer_event};
use support::{decl_module, decl_event, impl_outer_origin, impl_outer_event};
use runtime_io::{with_externalities, Blake2Hasher};
use primitives::H256;
use sr_primitives::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header};
@@ -51,7 +51,7 @@ impl_outer_event! {
}
}
srml_support::parameter_types! {
support::parameter_types! {
pub const BlockHashCount: u64 = 250;
pub const MaximumBlockWeight: u32 = 4 * 1024 * 1024;
pub const MaximumBlockLength: u32 = 4 * 1024 * 1024;
+3 -3
View File
@@ -68,7 +68,7 @@
//! ### Example - Get random seed and extrinsic count for the current block
//!
//! ```
//! use srml_support::{decl_module, dispatch::Result};
//! use support::{decl_module, dispatch::Result};
//! use srml_system::{self as system, ensure_signed};
//!
//! pub trait Trait: system::Trait {}
@@ -108,7 +108,7 @@ use sr_primitives::traits::{self, CheckEqual, SimpleArithmetic, Zero, SignedExte
MaybeSerializeDebugButNotDeserialize, MaybeSerializeDebug, StaticLookup, One, Bounded, Lookup,
};
use primitives::storage::well_known_keys;
use srml_support::{
use support::{
storage, decl_module, decl_event, decl_storage, StorageDoubleMap, StorageValue, StorageMap,
Parameter, for_each_tuple, traits::{Contains, Get}
};
@@ -1144,7 +1144,7 @@ mod tests {
use runtime_io::with_externalities;
use primitives::H256;
use sr_primitives::{traits::{BlakeTwo256, IdentityLookup}, testing::Header};
use srml_support::{impl_outer_origin, parameter_types};
use support::{impl_outer_origin, parameter_types};
impl_outer_origin!{
pub enum Origin for Test where system = super {}