mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +00:00
Companion for Weight v1.5 (#5943)
* fix to latest substrate pr
* update weights
* cargo build -p polkadot-runtime-parachains
* fix xcm-builder
* fix import
* fix a bunch
* fix a bunch of weight stuff
* kusama compile
* unused
* builds
* maybe fix
* cargo test -p polkadot-runtime-parachains
* xcm simulator example
* fix tests
* xcm sim fuzz
* fix runtime tests
* remove unused
* fix integration tests
* scalar div
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
use crate::{fungible as xcm_balances_benchmark, mock::*};
|
||||
use frame_benchmarking::BenchmarkError;
|
||||
use frame_support::{parameter_types, traits::Everything};
|
||||
use frame_support::{parameter_types, traits::Everything, weights::Weight};
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
testing::Header,
|
||||
@@ -47,7 +47,7 @@ frame_support::construct_runtime!(
|
||||
parameter_types! {
|
||||
pub const BlockHashCount: u64 = 250;
|
||||
pub BlockWeights: frame_system::limits::BlockWeights =
|
||||
frame_system::limits::BlockWeights::simple_max(1024);
|
||||
frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(1024));
|
||||
}
|
||||
impl frame_system::Config for Test {
|
||||
type BaseCallFilter = Everything;
|
||||
|
||||
@@ -115,7 +115,7 @@ benchmarks! {
|
||||
|
||||
let instruction = Instruction::Transact {
|
||||
origin_type: OriginKind::SovereignAccount,
|
||||
require_weight_at_most: noop_call.get_dispatch_info().weight,
|
||||
require_weight_at_most: noop_call.get_dispatch_info().weight.ref_time(),
|
||||
call: double_encoded_noop_call,
|
||||
};
|
||||
let xcm = Xcm(vec![instruction]);
|
||||
|
||||
@@ -21,6 +21,7 @@ use codec::Decode;
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
traits::{Everything, OriginTrait},
|
||||
weights::Weight,
|
||||
};
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
@@ -51,7 +52,7 @@ frame_support::construct_runtime!(
|
||||
parameter_types! {
|
||||
pub const BlockHashCount: u64 = 250;
|
||||
pub BlockWeights: frame_system::limits::BlockWeights =
|
||||
frame_system::limits::BlockWeights::simple_max(1024);
|
||||
frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(1024));
|
||||
}
|
||||
|
||||
impl frame_system::Config for Test {
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::*;
|
||||
use frame_support::{parameter_types, weights::Weight};
|
||||
use frame_support::parameter_types;
|
||||
use xcm::latest::Weight as XCMWeight;
|
||||
use xcm_executor::traits::FilterAssetLocation;
|
||||
|
||||
// An xcm sender/receiver akin to > /dev/null
|
||||
@@ -30,7 +31,7 @@ impl xcm_executor::traits::OnResponse for DevNull {
|
||||
fn expecting_response(_: &MultiLocation, _: u64) -> bool {
|
||||
false
|
||||
}
|
||||
fn on_response(_: &MultiLocation, _: u64, _: Response, _: Weight) -> Weight {
|
||||
fn on_response(_: &MultiLocation, _: u64, _: Response, _: XCMWeight) -> XCMWeight {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -52,7 +53,7 @@ impl xcm_executor::traits::Convert<MultiLocation, u64> for AccountIdConverter {
|
||||
|
||||
parameter_types! {
|
||||
pub Ancestry: MultiLocation = Junction::Parachain(101).into();
|
||||
pub UnitWeightCost: Weight = 10;
|
||||
pub UnitWeightCost: u64 = 10;
|
||||
pub WeightPrice: (AssetId, u128) = (Concrete(Here.into()), 1_000_000);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weights for `{{pallet}}`.
|
||||
|
||||
Reference in New Issue
Block a user