fix for latest substrate crate renaming (#641)

* rename crates as appropriate

* Rename to use master - easy to revert, but shows it's working

* Bump runtime version

* Bump version

* Bump Substrate again
This commit is contained in:
Benjamin Kampmann
2019-12-02 16:56:50 +01:00
committed by Gavin Wood
parent 0c1ef33541
commit 7832ad93cd
50 changed files with 1741 additions and 1741 deletions
+51 -51
View File
@@ -1,6 +1,6 @@
[package]
name = "polkadot-runtime"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
build = "build.rs"
@@ -14,49 +14,49 @@ safe-mix = { version = "1.0.0", default-features = false }
serde = { version = "1.0.102", default-features = false }
serde_derive = { version = "1.0.102", optional = true }
authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
babe-primitives = { package = "substrate-consensus-babe-primitives", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
inherents = { package = "substrate-inherents", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
offchain-primitives = { package = "substrate-offchain-primitives", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
rstd = { package = "sr-std", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-staking-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
substrate-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
substrate-serializer = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
substrate-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
version = { package = "sr-version", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
tx-pool-api = { package = "sp-transaction-pool-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
block-builder-api = { package = "substrate-block-builder-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
rstd = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-serializer = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-sesssion = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
version = { package = "sp-version", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
tx-pool-api = { package = "sp-transaction-pool-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
authority-discovery = { package = "pallet-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
authorship = { package = "pallet-authorship", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
balances = { package = "pallet-balances", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
transaction-payment = { package = "pallet-transaction-payment", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
collective = { package = "pallet-collective", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
democracy = { package = "pallet-democracy", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
finality-tracker = { package = "pallet-finality-tracker", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
grandpa = { package = "pallet-grandpa", git = "https://github.com/paritytech/substrate", default-features = false, features = ["migrate-authorities"], branch = "polkadot-master" }
im-online = { package = "pallet-im-online", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
indices = { package = "pallet-indices", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
membership = { package = "pallet-membership", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
nicks = { package = "pallet-nicks", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
offences = { package = "pallet-offences", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
randomness-collective-flip = { package = "pallet-randomness-collective-flip", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
session = { package = "pallet-session", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
staking = { package = "pallet-staking", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sudo = { package = "pallet-sudo", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
system = { package = "frame-system", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
system_rpc_runtime_api = { package = "frame-system-rpc-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
treasury = { package = "pallet-treasury", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
authority-discovery = { package = "pallet-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
authorship = { package = "pallet-authorship", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
balances = { package = "pallet-balances", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
transaction-payment = { package = "pallet-transaction-payment", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
collective = { package = "pallet-collective", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
democracy = { package = "pallet-democracy", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
finality-tracker = { package = "pallet-finality-tracker", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
grandpa = { package = "pallet-grandpa", git = "https://github.com/paritytech/substrate", default-features = false, features = ["migrate-authorities"], branch = "master" }
im-online = { package = "pallet-im-online", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
indices = { package = "pallet-indices", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
membership = { package = "pallet-membership", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
nicks = { package = "pallet-nicks", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
offences = { package = "pallet-offences", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
randomness-collective-flip = { package = "pallet-randomness-collective-flip", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
session = { package = "pallet-session", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
staking = { package = "pallet-staking", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" }
sudo = { package = "pallet-sudo", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
system = { package = "frame-system", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
system_rpc_runtime_api = { package = "frame-system-rpc-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
treasury = { package = "pallet-treasury", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
primitives = { package = "polkadot-primitives", path = "../primitives", default-features = false }
polkadot-parachain = { path = "../parachain", default-features = false }
@@ -65,8 +65,8 @@ polkadot-parachain = { path = "../parachain", default-features = false }
hex-literal = "0.2.1"
libsecp256k1 = "0.3.2"
tiny-keccak = "1.5.0"
keyring = { package = "substrate-keyring", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
substrate-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" }
trie-db = "0.16.0"
serde_json = "1.0.41"
@@ -85,14 +85,14 @@ std = [
"rustc-hex/std",
"codec/std",
"inherents/std",
"substrate-primitives/std",
"sp-core/std",
"polkadot-parachain/std",
"sr-api/std",
"sp-api/std",
"tx-pool-api/std",
"block-builder-api/std",
"offchain-primitives/std",
"rstd/std",
"sr-io/std",
"sp-io/std",
"frame-support/std",
"authorship/std",
"balances/std",
@@ -109,8 +109,8 @@ std = [
"membership/std",
"nicks/std",
"offences/std",
"sr-primitives/std",
"sr-staking-primitives/std",
"sp-runtime/std",
"sp-staking/std",
"session/std",
"staking/std",
"sudo/std",
@@ -125,6 +125,6 @@ std = [
"safe-mix/std",
"babe/std",
"babe-primitives/std",
"substrate-session/std",
"sp-sesssion/std",
"randomness-collective-flip/std",
]
+2 -2
View File
@@ -24,8 +24,8 @@ use codec::{Encode, Decode};
use frame_support::{decl_storage, decl_module, ensure, dispatch::Result, traits::Get};
use primitives::{Hash, parachain::{AttestedCandidate, CandidateReceipt, Id as ParaId}};
use sr_primitives::RuntimeDebug;
use sr_staking_primitives::SessionIndex;
use sp_runtime::RuntimeDebug;
use sp_staking::SessionIndex;
use inherents::{ProvideInherent, InherentData, MakeFatalError, InherentIdentifier};
use system::ensure_none;
+8 -8
View File
@@ -17,7 +17,7 @@
//! Module to process claims from Ethereum addresses.
use rstd::prelude::*;
use sr_io::{hashing::keccak_256, crypto::secp256k1_ecdsa_recover};
use sp_io::{hashing::keccak_256, crypto::secp256k1_ecdsa_recover};
use frame_support::{decl_event, decl_storage, decl_module};
use frame_support::weights::SimpleDispatchInfo;
use frame_support::traits::{Currency, Get};
@@ -26,8 +26,8 @@ use codec::{Encode, Decode};
#[cfg(feature = "std")]
use serde::{self, Serialize, Deserialize, Serializer, Deserializer};
#[cfg(feature = "std")]
use sr_primitives::traits::Zero;
use sr_primitives::{
use sp_runtime::traits::Zero;
use sp_runtime::{
RuntimeDebug, transaction_validity::{
TransactionLongevity, TransactionValidity, ValidTransaction, InvalidTransaction
},
@@ -200,7 +200,7 @@ impl<T: Trait> Module<T> {
}
#[allow(deprecated)] // Allow `ValidateUnsigned`
impl<T: Trait> sr_primitives::traits::ValidateUnsigned for Module<T> {
impl<T: Trait> sp_runtime::traits::ValidateUnsigned for Module<T> {
type Call = Call<T>;
fn validate_unsigned(call: &Self::Call) -> TransactionValidity {
@@ -244,11 +244,11 @@ mod tests {
use hex_literal::hex;
use super::*;
use substrate_primitives::H256;
use sp_core::H256;
use codec::Encode;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sr_primitives::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header};
use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header};
use balances;
use frame_support::{impl_outer_origin, assert_ok, assert_err, assert_noop, parameter_types};
@@ -339,7 +339,7 @@ mod tests {
// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
fn new_test_ext() -> sr_io::TestExternalities {
fn new_test_ext() -> sp_io::TestExternalities {
let mut t = system::GenesisConfig::default().build_storage::<Test>().unwrap();
// We use default for brevity, but you can configure as desired if needed.
balances::GenesisConfig::<Test>::default().assimilate_storage(&mut t).unwrap();
@@ -442,7 +442,7 @@ mod tests {
#[test]
fn validate_unsigned_works() {
#![allow(deprecated)] // Allow `ValidateUnsigned`
use sr_primitives::traits::ValidateUnsigned;
use sp_runtime::traits::ValidateUnsigned;
new_test_ext().execute_with(|| {
assert_eq!(
+1 -1
View File
@@ -50,7 +50,7 @@ pub mod time {
/// Fee-related.
pub mod fee {
pub use sr_primitives::Perbill;
pub use sp_runtime::Perbill;
/// The block saturation level. Fees will be updates based on this value.
pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);
+5 -5
View File
@@ -72,14 +72,14 @@ use frame_support::{
}
};
use system::ensure_signed;
use sr_primitives::{ModuleId,
use sp_runtime::{ModuleId,
traits::{AccountIdConversion, Hash, Saturating, Zero, CheckedAdd}
};
use frame_support::weights::SimpleDispatchInfo;
use crate::slots;
use codec::{Encode, Decode};
use rstd::vec::Vec;
use substrate_primitives::storage::well_known_keys::CHILD_STORAGE_KEY_PREFIX;
use sp_core::storage::well_known_keys::CHILD_STORAGE_KEY_PREFIX;
use primitives::parachain::Id as ParaId;
const MODULE_ID: ModuleId = ModuleId(*b"py/cfund");
@@ -491,11 +491,11 @@ mod tests {
use std::{collections::HashMap, cell::RefCell};
use frame_support::{impl_outer_origin, assert_ok, assert_noop, parameter_types};
use substrate_primitives::H256;
use sp_core::H256;
use primitives::parachain::{Info as ParaInfo, Id as ParaId};
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried.
use sr_primitives::{
use sp_runtime::{
Perbill, Permill, testing::Header,
traits::{BlakeTwo256, OnInitialize, OnFinalize, IdentityLookup},
};
@@ -643,7 +643,7 @@ mod tests {
// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
fn new_test_ext() -> sr_io::TestExternalities {
fn new_test_ext() -> sp_io::TestExternalities {
let mut t = system::GenesisConfig::default().build_storage::<Test>().unwrap();
balances::GenesisConfig::<Test>{
balances: vec![(1, 1000), (2, 2000), (3, 3000), (4, 4000)],
+2 -2
View File
@@ -17,8 +17,8 @@
//! Auxillary struct/enums for polkadot runtime.
use primitives::Balance;
use sr_primitives::traits::{Convert, Saturating};
use sr_primitives::{Fixed64, Perbill};
use sp_runtime::traits::{Convert, Saturating};
use sp_runtime::{Fixed64, Perbill};
use frame_support::weights::Weight;
use frame_support::traits::{OnUnbalanced, Currency, Get};
use crate::{Balances, System, Authorship, MaximumBlockWeight, NegativeImbalance};
+11 -11
View File
@@ -29,13 +29,13 @@ mod slots;
mod crowdfund;
use rstd::prelude::*;
use substrate_primitives::u32_trait::{_1, _2, _3, _4, _5};
use sp_core::u32_trait::{_1, _2, _3, _4, _5};
use codec::{Encode, Decode};
use primitives::{
AccountId, AccountIndex, Balance, BlockNumber, Hash, Nonce, Signature, Moment,
parachain::{self, ActiveParas}, ValidityError,
};
use sr_primitives::{
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
ApplyExtrinsicResult, Permill, Perbill, RuntimeDebug,
transaction_validity::{TransactionValidity, InvalidTransaction, TransactionValidityError},
@@ -46,8 +46,8 @@ use version::RuntimeVersion;
use grandpa::{AuthorityId as GrandpaId, fg_primitives};
#[cfg(any(feature = "std", test))]
use version::NativeVersion;
use substrate_primitives::OpaqueMetadata;
use sr_staking_primitives::SessionIndex;
use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, traits::{SplitTwoWays, Currency, Randomness},
weights::{Weight, DispatchInfo},
@@ -60,7 +60,7 @@ use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
#[cfg(feature = "std")]
pub use staking::StakerStatus;
#[cfg(any(feature = "std", test))]
pub use sr_primitives::BuildStorage;
pub use sp_runtime::BuildStorage;
pub use timestamp::Call as TimestampCall;
pub use balances::Call as BalancesCall;
pub use attestations::{Call as AttestationsCall, MORE_ATTESTATIONS_IDENTIFIER};
@@ -97,7 +97,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kusama"),
impl_name: create_runtime_str!("parity-kusama"),
authoring_version: 2,
spec_version: 1022,
spec_version: 1023,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
};
@@ -641,8 +641,8 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Nonce, Call>;
/// Executive: handles dispatch to the various modules.
pub type Executive = executive::Executive<Runtime, Block, system::ChainContext<Runtime>, Runtime, AllModules>;
sr_api::impl_runtime_apis! {
impl sr_api::Core<Block> for Runtime {
sp_api::impl_runtime_apis! {
impl sp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
VERSION
}
@@ -656,7 +656,7 @@ sr_api::impl_runtime_apis! {
}
}
impl sr_api::Metadata<Block> for Runtime {
impl sp_api::Metadata<Block> for Runtime {
fn metadata() -> OpaqueMetadata {
Runtime::metadata().into()
}
@@ -694,7 +694,7 @@ sr_api::impl_runtime_apis! {
}
impl offchain_primitives::OffchainWorkerApi<Block> for Runtime {
fn offchain_worker(number: sr_primitives::traits::NumberFor<Block>) {
fn offchain_worker(number: sp_runtime::traits::NumberFor<Block>) {
Executive::offchain_worker(number)
}
}
@@ -752,7 +752,7 @@ sr_api::impl_runtime_apis! {
}
}
impl substrate_session::SessionKeys<Block> for Runtime {
impl sp_sesssion::SessionKeys<Block> for Runtime {
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
SessionKeys::generate(seed)
}
+9 -9
View File
@@ -21,7 +21,7 @@ use rstd::result;
use rstd::collections::btree_map::BTreeMap;
use codec::{Encode, Decode};
use sr_primitives::traits::{
use sp_runtime::traits::{
Hash as HashT, BlakeTwo256, Saturating, One, Zero, Dispatchable,
AccountIdConversion,
};
@@ -455,7 +455,7 @@ impl<T: Trait> Module<T> {
// same.
ordered_needs_dispatch.insert(i, id);
} else {
sr_primitives::print("ordered_needs_dispatch contains id?!");
sp_runtime::print("ordered_needs_dispatch contains id?!");
}
}
}
@@ -657,7 +657,7 @@ impl<T: Trait> Module<T> {
) -> rstd::result::Result<IncludedBlocks<T>, &'static str>
{
use primitives::parachain::ValidityAttestation;
use sr_primitives::traits::AppVerify;
use sp_runtime::traits::AppVerify;
// returns groups of slices that have the same chain ID.
// assumes the inner slice is sorted by id.
@@ -841,7 +841,7 @@ impl<T: Trait> Module<T> {
*/
}
impl<T: Trait> sr_primitives::BoundToRuntimeAppPublic for Module<T> {
impl<T: Trait> sp_runtime::BoundToRuntimeAppPublic for Module<T> {
type Public = ValidatorId;
}
@@ -901,10 +901,10 @@ mod tests {
use super::*;
use super::Call as ParachainsCall;
use bitvec::{bitvec, vec::BitVec};
use sr_io::TestExternalities;
use substrate_primitives::{H256, Blake2Hasher};
use substrate_trie::NodeCodec;
use sr_primitives::{
use sp_io::TestExternalities;
use sp_core::{H256, Blake2Hasher};
use sp_trie::NodeCodec;
use sp_runtime::{
Perbill, curve::PiecewiseLinear, testing::{UintAuthorityId, Header},
traits::{BlakeTwo256, IdentityLookup, OnInitialize, OnFinalize},
};
@@ -1038,7 +1038,7 @@ mod tests {
}
parameter_types! {
pub const SessionsPerEra: sr_staking_primitives::SessionIndex = 6;
pub const SessionsPerEra: sp_staking::SessionIndex = 6;
pub const BondingDuration: staking::EraIndex = 28;
pub const SlashDeferDuration: staking::EraIndex = 7;
pub const AttestationPeriod: BlockNumber = 100;
+6 -6
View File
@@ -23,7 +23,7 @@ use rstd::{prelude::*, result};
use rstd::marker::PhantomData;
use codec::{Encode, Decode};
use sr_primitives::{
use sp_runtime::{
transaction_validity::{TransactionValidityError, ValidTransaction, TransactionValidity},
traits::{Hash as HashT, SignedExtension}
};
@@ -39,7 +39,7 @@ use primitives::parachain::{
Retriable
};
use crate::parachains;
use sr_primitives::transaction_validity::InvalidTransaction;
use sp_runtime::transaction_validity::InvalidTransaction;
/// Parachain registration API.
pub trait Registrar<AccountId> {
@@ -178,7 +178,7 @@ decl_storage! {
#[cfg(feature = "std")]
fn build<T: Trait>(config: &GenesisConfig<T>) {
use sr_primitives::traits::Zero;
use sp_runtime::traits::Zero;
let mut p = config.parachains.clone();
p.sort_unstable_by_key(|&(ref id, _, _)| *id);
@@ -574,9 +574,9 @@ impl<T: Trait + Send + Sync> SignedExtension for LimitParathreadCommits<T> where
mod tests {
use super::*;
use bitvec::vec::BitVec;
use sr_io::TestExternalities;
use substrate_primitives::{H256, Pair};
use sr_primitives::{
use sp_io::TestExternalities;
use sp_core::{H256, Pair};
use sp_runtime::{
traits::{
BlakeTwo256, IdentityLookup, OnInitialize, OnFinalize, Dispatchable,
AccountIdConversion,
+1 -1
View File
@@ -18,7 +18,7 @@
//! represent all sub ranges between 0 and 3 inclusive.
use rstd::{result, ops::Add, convert::{TryFrom, TryInto}};
use sr_primitives::traits::CheckedSub;
use sp_runtime::traits::CheckedSub;
use codec::{Encode, Decode};
/// Total number of possible sub ranges of slots.
+4 -4
View File
@@ -19,7 +19,7 @@
//! information for commissioning and decommissioning them.
use rstd::{prelude::*, mem::swap, convert::TryInto};
use sr_primitives::traits::{
use sp_runtime::traits::{
CheckedSub, StaticLookup, Zero, One, CheckedConversion, Hash, AccountIdConversion,
};
use frame_support::weights::SimpleDispatchInfo;
@@ -820,8 +820,8 @@ mod tests {
use super::*;
use std::{result::Result, collections::HashMap, cell::RefCell};
use substrate_primitives::H256;
use sr_primitives::{
use sp_core::H256;
use sp_runtime::{
Perbill, testing::Header,
traits::{BlakeTwo256, Hash, IdentityLookup, OnInitialize, OnFinalize},
};
@@ -948,7 +948,7 @@ mod tests {
// This function basically just builds a genesis storage key/value store according to
// our desired mock up.
fn new_test_ext() -> sr_io::TestExternalities {
fn new_test_ext() -> sp_io::TestExternalities {
let mut t = system::GenesisConfig::default().build_storage::<Test>().unwrap();
balances::GenesisConfig::<Test>{
balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)],