Update Substrate after repository reorganisation (#587) (#598)

* Update Substrate after repository reorganisation

* Switch back to polkadot-master

* Bump `bitvec` and `parity-scale-codec` (#591)

Also bump other dependencies, but respect semver on them.
This commit is contained in:
Gavin Wood
2019-11-19 18:30:01 +01:00
committed by GitHub
parent 6962a6a6b8
commit d5c521a086
31 changed files with 1196 additions and 1059 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
use rstd::prelude::*;
use codec::{Encode, Decode};
use srml_support::{decl_storage, decl_module, ensure, dispatch::Result, traits::Get};
use paint_support::{decl_storage, decl_module, ensure, dispatch::Result, traits::Get};
use primitives::{Hash, parachain::{AttestedCandidate, CandidateReceipt, Id as ParaId}};
use sr_primitives::RuntimeDebug;
+3 -3
View File
@@ -18,8 +18,8 @@
use rstd::prelude::*;
use sr_io::{hashing::keccak_256, crypto::secp256k1_ecdsa_recover};
use srml_support::{decl_event, decl_storage, decl_module};
use srml_support::traits::{Currency, Get};
use paint_support::{decl_event, decl_storage, decl_module};
use paint_support::traits::{Currency, Get};
use system::{ensure_root, ensure_none};
use codec::{Encode, Decode};
#[cfg(feature = "std")]
@@ -249,7 +249,7 @@ mod tests {
// 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 balances;
use srml_support::{impl_outer_origin, assert_ok, assert_err, assert_noop, parameter_types};
use paint_support::{impl_outer_origin, assert_ok, assert_err, assert_noop, parameter_types};
impl_outer_origin! {
pub enum Origin for Test {}
+2 -2
View File
@@ -66,7 +66,7 @@
//! order to win a later auction, then it is the parachain's duty to ensure that the right amount of
//! funds ultimately end up in module's fund sub-account.
use srml_support::{
use paint_support::{
decl_module, decl_storage, decl_event, storage::child, ensure, traits::{
Currency, Get, OnUnbalanced, WithdrawReason, ExistenceRequirement::AllowDeath
}
@@ -489,7 +489,7 @@ mod tests {
use super::*;
use std::{collections::HashMap, cell::RefCell};
use srml_support::{impl_outer_origin, assert_ok, assert_noop, parameter_types};
use paint_support::{impl_outer_origin, assert_ok, assert_noop, parameter_types};
use substrate_primitives::H256;
use primitives::parachain::{Info as ParaInfo, Id as ParaId};
// The testing primitives are very useful for avoiding having to work with signatures
+1 -1
View File
@@ -20,7 +20,7 @@ use primitives::Balance;
use sr_primitives::weights::Weight;
use sr_primitives::traits::{Convert, Saturating};
use sr_primitives::{Fixed64, Perbill};
use srml_support::traits::{OnUnbalanced, Currency, Get};
use paint_support::traits::{OnUnbalanced, Currency, Get};
use crate::{Balances, System, Authorship, MaximumBlockWeight, NegativeImbalance};
/// Logic for the author to get a portion of fees.
+4 -4
View File
@@ -48,12 +48,12 @@ use grandpa::{AuthorityId as GrandpaId, fg_primitives};
use version::NativeVersion;
use substrate_primitives::OpaqueMetadata;
use sr_staking_primitives::SessionIndex;
use srml_support::{
use paint_support::{
parameter_types, construct_runtime, traits::{SplitTwoWays, Currency, Randomness}
};
use im_online::sr25519::AuthorityId as ImOnlineId;
use system::offchain::TransactionSubmitter;
use srml_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
use paint_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
#[cfg(feature = "std")]
pub use staking::StakerStatus;
@@ -278,7 +278,7 @@ impl session::historical::Trait for Runtime {
type FullIdentificationOf = staking::ExposureOf<Runtime>;
}
srml_staking_reward_curve::build! {
paint_staking_reward_curve::build! {
const REWARD_CURVE: PiecewiseLinear<'static> = curve!(
min_inflation: 0_025_000,
max_inflation: 0_100_000,
@@ -738,7 +738,7 @@ sr_api::impl_runtime_apis! {
}
}
impl srml_transaction_payment_rpc_runtime_api::TransactionPaymentApi<
impl paint_transaction_payment_rpc_runtime_api::TransactionPaymentApi<
Block,
Balance,
UncheckedExtrinsic,
+4 -5
View File
@@ -20,7 +20,6 @@ use rstd::prelude::*;
use rstd::result;
use rstd::collections::btree_map::BTreeMap;
use codec::{Encode, Decode};
use srml_support::{decl_storage, decl_module, ensure};
use sr_primitives::traits::{
Hash as HashT, BlakeTwo256, Saturating, One, Zero, Dispatchable,
@@ -34,8 +33,8 @@ use primitives::{
UpwardMessage, BlockIngressRoots, ValidatorId, ActiveParas, CollatorId, Retriable
},
};
use srml_support::{
Parameter, dispatch::Result,
use paint_support::{
Parameter, dispatch::Result, decl_storage, decl_module, ensure,
traits::{Currency, Get, WithdrawReason, ExistenceRequirement, Randomness},
};
@@ -918,7 +917,7 @@ mod tests {
};
use crate::constants::time::*;
use keyring::Sr25519Keyring;
use srml_support::{
use paint_support::{
impl_outer_origin, impl_outer_dispatch, assert_ok, assert_err, parameter_types,
};
use crate::parachains;
@@ -1027,7 +1026,7 @@ mod tests {
type CreationFee = CreationFee;
}
srml_staking_reward_curve::build! {
paint_staking_reward_curve::build! {
const REWARD_CURVE: PiecewiseLinear<'static> = curve!(
min_inflation: 0_025_000,
max_inflation: 0_100_000,
+2 -2
View File
@@ -29,7 +29,7 @@ use sr_primitives::{
traits::{Hash as HashT, SignedExtension}
};
use srml_support::{
use paint_support::{
decl_storage, decl_module, decl_event, ensure,
dispatch::{Result, IsSubType}, traits::{Get, Currency, ReservableCurrency}
};
@@ -588,7 +588,7 @@ mod tests {
},
Balance, BlockNumber,
};
use srml_support::{
use paint_support::{
impl_outer_origin, impl_outer_dispatch, assert_ok, parameter_types, assert_noop,
};
use keyring::Sr25519Keyring;
+5 -3
View File
@@ -19,10 +19,12 @@
//! information for commissioning and decommissioning them.
use rstd::{prelude::*, mem::swap, convert::TryInto};
use sr_primitives::traits::{CheckedSub, StaticLookup, Zero, One, CheckedConversion, Hash, AccountIdConversion};
use sr_primitives::traits::{
CheckedSub, StaticLookup, Zero, One, CheckedConversion, Hash, AccountIdConversion,
};
use sr_primitives::weights::SimpleDispatchInfo;
use codec::{Encode, Decode, Codec};
use srml_support::{
use paint_support::{
decl_module, decl_storage, decl_event, ensure,
traits::{Currency, ReservableCurrency, WithdrawReason, ExistenceRequirement, Get, Randomness},
};
@@ -823,7 +825,7 @@ mod tests {
Perbill, testing::Header,
traits::{BlakeTwo256, Hash, IdentityLookup, OnInitialize, OnFinalize},
};
use srml_support::{impl_outer_origin, parameter_types, assert_ok, assert_noop};
use paint_support::{impl_outer_origin, parameter_types, assert_ok, assert_noop};
use balances;
use primitives::parachain::{Id as ParaId, Info as ParaInfo};