Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into oty-enable-features
Browse files Browse the repository at this point in the history
  • Loading branch information
parity-processbot committed Sep 14, 2022
2 parents 983c0e4 + e044149 commit 6331079
Show file tree
Hide file tree
Showing 15 changed files with 254 additions and 209 deletions.
412 changes: 230 additions & 182 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion node/core/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
[dependencies]
futures = "0.3.21"
gum = { package = "tracing-gum", path = "../../gum" }
memory-lru = "0.1.0"
memory-lru = "0.1.1"
parity-util-mem = { version = "0.11.0", default-features = false }

sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
7 changes: 1 addition & 6 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use {
peer_set::PeerSetProtocolNames, request_response::ReqProtocolNames,
},
polkadot_overseer::BlockInfo,
sc_client_api::{BlockBackend, ExecutorProvider},
sc_client_api::BlockBackend,
sp_core::traits::SpawnNamed,
sp_trie::PrefixedMemoryDB,
};
Expand Down Expand Up @@ -545,7 +545,6 @@ where
},
&task_manager.spawn_essential_handle(),
config.prometheus_registry(),
consensus_common::CanAuthorWithNativeVersion::new(client.executor().clone()),
telemetry.as_ref().map(|x| x.handle()),
)?;

Expand Down Expand Up @@ -1114,9 +1113,6 @@ where
};

if role.is_authority() {
let can_author_with =
consensus_common::CanAuthorWithNativeVersion::new(client.executor().clone());

let proposer = sc_basic_authorship::ProposerFactory::new(
task_manager.spawn_handle(),
client.clone(),
Expand Down Expand Up @@ -1162,7 +1158,6 @@ where
force_authoring,
backoff_authoring_blocks,
babe_link,
can_author_with,
block_proposal_slot_portion: babe::SlotProportion::new(2f32 / 3f32),
max_block_proposal_slot_portion: None,
telemetry: telemetry.as_ref().map(|x| x.handle()),
Expand Down
2 changes: 1 addition & 1 deletion node/test/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pub fn node_config(
is_validator: bool,
) -> Configuration {
let base_path = BasePath::new_temp_dir().expect("could not create temporary directory");
let root = base_path.path();
let root = base_path.path().join(key.to_string());
let role = if is_validator { Role::Authority } else { Role::Full };
let key_seed = key.to_seed();
let mut spec = polkadot_local_testnet_config();
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/auctions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type WinnersData<T> =
#[frame_support::pallet]
pub mod pallet {
use super::*;
use frame_support::{pallet_prelude::*, traits::EnsureOrigin, weights::DispatchClass};
use frame_support::{dispatch::DispatchClass, pallet_prelude::*, traits::EnsureOrigin};
use frame_system::{ensure_root, ensure_signed, pallet_prelude::*};

#[pallet::pallet]
Expand Down
3 changes: 1 addition & 2 deletions runtime/common/src/claims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,9 @@ mod tests {
use claims::Call as ClaimsCall;
use frame_support::{
assert_err, assert_noop, assert_ok,
dispatch::DispatchError::BadOrigin,
dispatch::{DispatchError::BadOrigin, GetDispatchInfo, Pays},
ord_parameter_types, parameter_types,
traits::{ExistenceRequirement, GenesisBuild},
weights::{GetDispatchInfo, Pays},
};
use pallet_balances;
use sp_runtime::{
Expand Down
5 changes: 1 addition & 4 deletions runtime/common/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ where
mod tests {
use super::*;
use frame_support::{
parameter_types,
traits::FindAuthor,
weights::{DispatchClass, Weight},
PalletId,
dispatch::DispatchClass, parameter_types, traits::FindAuthor, weights::Weight, PalletId,
};
use frame_system::limits;
use primitives::v2::AccountId;
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub type SlowAdjustingFeeUpdate<R> =
#[macro_export]
macro_rules! impl_runtime_weights {
($runtime:ident) => {
use frame_support::weights::{DispatchClass, Weight};
use frame_support::{dispatch::DispatchClass, weights::Weight};
use frame_system::limits;
use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
pub use runtime_common::{
Expand Down
2 changes: 1 addition & 1 deletion runtime/kusama/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! Tests for the Kusama Runtime Configuration

use crate::*;
use frame_support::weights::{GetDispatchInfo, WeightToFee as WeightToFeeT};
use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT};
use keyring::Sr25519Keyring::Charlie;
use pallet_transaction_payment::Multiplier;
use parity_scale_codec::Encode;
Expand Down
2 changes: 1 addition & 1 deletion runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2034,7 +2034,7 @@ sp_api::impl_runtime_apis! {
#[cfg(test)]
mod test_fees {
use super::*;
use frame_support::weights::{GetDispatchInfo, WeightToFee as WeightToFeeT};
use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT};
use keyring::Sr25519Keyring::{Alice, Charlie};
use pallet_transaction_payment::Multiplier;
use runtime_common::MinimumMultiplier;
Expand Down
5 changes: 4 additions & 1 deletion xcm/pallet-xcm-benchmarks/src/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ mod mock;
#[frame_support::pallet]
pub mod pallet {
use frame_benchmarking::BenchmarkError;
use frame_support::{dispatch::Dispatchable, pallet_prelude::Encode, weights::GetDispatchInfo};
use frame_support::{
dispatch::{Dispatchable, GetDispatchInfo},
pallet_prelude::Encode,
};
use xcm::latest::{MultiAssets, MultiLocation, Response};

#[pallet::config]
Expand Down
6 changes: 4 additions & 2 deletions xcm/xcm-builder/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ pub use crate::{
FixedRateOfFungible, FixedWeightBounds, LocationInverter, TakeWeightCredit,
};
pub use frame_support::{
dispatch::{DispatchError, DispatchInfo, DispatchResultWithPostInfo, Dispatchable, Parameter},
dispatch::{
DispatchError, DispatchInfo, DispatchResultWithPostInfo, Dispatchable, GetDispatchInfo,
Parameter, PostDispatchInfo,
},
ensure, parameter_types,
sp_runtime::DispatchErrorWithPostInfo,
traits::{Contains, Get, IsInVec},
weights::{GetDispatchInfo, PostDispatchInfo},
};
pub use parity_scale_codec::{Decode, Encode};
pub use sp_std::{
Expand Down
3 changes: 2 additions & 1 deletion xcm/xcm-builder/src/weight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use frame_support::{
dispatch::GetDispatchInfo,
traits::{tokens::currency::Currency as CurrencyT, Get, OnUnbalanced as OnUnbalancedT},
weights::{constants::WEIGHT_PER_SECOND, GetDispatchInfo, WeightToFee as WeightToFeeT},
weights::{constants::WEIGHT_PER_SECOND, WeightToFee as WeightToFeeT},
};
use parity_scale_codec::Decode;
use sp_runtime::traits::{SaturatedConversion, Saturating, Zero};
Expand Down
5 changes: 1 addition & 4 deletions xcm/xcm-executor/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ use crate::traits::{
ClaimAssets, ConvertOrigin, DropAssets, FilterAssetLocation, InvertLocation, OnResponse,
ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader,
};
use frame_support::{
dispatch::{Dispatchable, Parameter},
weights::{GetDispatchInfo, PostDispatchInfo},
};
use frame_support::dispatch::{Dispatchable, GetDispatchInfo, Parameter, PostDispatchInfo};
use xcm::latest::SendXcm;

/// The trait to parameterize the `XcmExecutor`.
Expand Down
5 changes: 4 additions & 1 deletion xcm/xcm-executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

#![cfg_attr(not(feature = "std"), no_std)]

use frame_support::{dispatch::Dispatchable, ensure, weights::GetDispatchInfo};
use frame_support::{
dispatch::{Dispatchable, GetDispatchInfo},
ensure,
};
use sp_runtime::traits::Saturating;
use sp_std::{marker::PhantomData, prelude::*};
use xcm::latest::{
Expand Down

0 comments on commit 6331079

Please sign in to comment.