git.delta.rocks / unique-network / refs/commits / a49d3c7cd2cb

difftreelog

fix use IdentityFeeUpdate

Daniel Shiposha2022-09-09parent: #49182bd.patch.diff
in: master

1 file changed

modifiedruntime/common/config/substrate.rsdiffbeforeafterboth
26use sp_runtime::{26use sp_runtime::{
27 generic,27 generic,
28 traits::{BlakeTwo256, AccountIdLookup},28 traits::{BlakeTwo256, AccountIdLookup},
29 Perbill, Permill, Percent,29 Perquintill, Perbill, Permill, Percent,
30};30};
31use sp_arithmetic::traits::{Zero, One};
31use frame_system::{32use frame_system::{
32 limits::{BlockLength, BlockWeights},33 limits::{BlockLength, BlockWeights},
33 EnsureRoot,34 EnsureRoot,
34};35};
36use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
35use crate::{37use crate::{
36 runtime_common::DealWithFees, Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, PalletInfo,38 runtime_common::DealWithFees, Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, PalletInfo,
37 System, Balances, Treasury, SS58Prefix, Version,39 System, Balances, Treasury, SS58Prefix, Version,
153 /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`.155 /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`.
154 pub const OperationalFeeMultiplier: u8 = 5;156 pub const OperationalFeeMultiplier: u8 = 5;
157
158 pub const TargetBlockFullness: Perquintill = Perquintill::zero();
159
160 pub AdjustmentVariable: Multiplier = Multiplier::zero();
161
162 pub MinimumMultiplier: Multiplier = Multiplier::one();
155}163}
164
165pub type IdentityFeeUpdate<R> =
166 TargetedFeeAdjustment<R, TargetBlockFullness, AdjustmentVariable, MinimumMultiplier>;
156167
157impl pallet_transaction_payment::Config for Runtime {168impl pallet_transaction_payment::Config for Runtime {
158 type RuntimeEvent = RuntimeEvent;169 type RuntimeEvent = RuntimeEvent;
159 type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees>;170 type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees>;
160 type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;171 type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
161 type OperationalFeeMultiplier = OperationalFeeMultiplier;172 type OperationalFeeMultiplier = OperationalFeeMultiplier;
162 type WeightToFee = pallet_configuration::WeightToFee<Self, Balance>;173 type WeightToFee = pallet_configuration::WeightToFee<Self, Balance>;
163 type FeeMultiplierUpdate = ();174 type FeeMultiplierUpdate = IdentityFeeUpdate<Self>;
164}175}
165176
166parameter_types! {177parameter_types! {