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
@@ -11,10 +11,10 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features =
substrate-keyring = { path = "../../core/keyring", optional = true }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
phragmen = { package = "substrate-phragmen", path = "../../core/phragmen", 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-staking-primitives = { path = "../../core/sr-staking-primitives", default-features = false }
srml-support = { path = "../support", default-features = false }
support = { package = "srml-support", path = "../support", default-features = false }
system = { package = "srml-system", path = "../system", default-features = false }
session = { package = "srml-session", path = "../session", default-features = false, features = ["historical"] }
authorship = { package = "srml-authorship", path = "../authorship", default-features = false }
@@ -36,8 +36,8 @@ std = [
"codec/std",
"rstd/std",
"phragmen/std",
"runtime_io/std",
"srml-support/std",
"runtime-io/std",
"support/std",
"sr-primitives/std",
"sr-staking-primitives/std",
"session/std",
+2 -2
View File
@@ -136,7 +136,7 @@
//! ### Example: Rewarding a validator by id.
//!
//! ```
//! use srml_support::{decl_module, dispatch::Result};
//! use support::{decl_module, dispatch::Result};
//! use system::ensure_signed;
//! use srml_staking::{self as staking};
//!
@@ -261,7 +261,7 @@ mod benches;
use rstd::{prelude::*, result};
use codec::{HasCompact, Encode, Decode};
use srml_support::{
use support::{
StorageValue, StorageMap, StorageLinkedMap, decl_module, decl_event,
decl_storage, ensure, traits::{
Currency, OnFreeBalanceZero, OnDilution, LockIdentifier, LockableCurrency,
+3 -3
View File
@@ -23,8 +23,8 @@ use sr_primitives::testing::{Header, UintAuthorityId};
use sr_staking_primitives::SessionIndex;
use primitives::{H256, Blake2Hasher};
use runtime_io;
use srml_support::{assert_ok, impl_outer_origin, parameter_types, StorageLinkedMap};
use srml_support::traits::{Currency, Get, FindAuthor};
use support::{assert_ok, impl_outer_origin, parameter_types, StorageLinkedMap};
use support::traits::{Currency, Get, FindAuthor};
use crate::{
EraIndex, GenesisConfig, Module, Trait, StakerStatus, ValidatorPrefs, RewardDestination,
Nominators, inflation
@@ -92,7 +92,7 @@ impl_outer_origin!{
pub struct Author11;
impl FindAuthor<u64> for Author11 {
fn find_author<'a, I>(_digests: I) -> Option<u64>
where I: 'a + IntoIterator<Item=(srml_support::ConsensusEngineId, &'a [u8])>
where I: 'a + IntoIterator<Item=(support::ConsensusEngineId, &'a [u8])>
{
Some(11)
}
+2 -2
View File
@@ -20,9 +20,9 @@ use super::*;
use runtime_io::with_externalities;
use sr_primitives::traits::OnInitialize;
use sr_staking_primitives::offence::{OffenceDetails, OnOffenceHandler};
use srml_support::{assert_ok, assert_noop, assert_eq_uvec, StorageLinkedMap};
use support::{assert_ok, assert_noop, assert_eq_uvec, StorageLinkedMap};
use mock::*;
use srml_support::traits::{Currency, ReservableCurrency};
use support::traits::{Currency, ReservableCurrency};
#[test]
fn basic_setup_works() {