mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Companion PR for contract deletion updates (#2409)
* Companion PR for contract deletion updates see https://github.com/paritytech/substrate/pull/13702 * Revert "Companion PR for contract deletion updates" This reverts commit 4fb2ca53a1bdfbd7dc0d35be52525da99547c76c. * fix lint * update lockfile for {"polkadot", "substrate"} --------- Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+256
-256
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,13 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
constants::currency::deposit, Balance, Balances, RandomnessCollectiveFlip, Runtime,
|
constants::currency::deposit, Balance, Balances, RandomnessCollectiveFlip, Runtime,
|
||||||
RuntimeBlockWeights, RuntimeCall, RuntimeEvent, Timestamp,
|
RuntimeCall, RuntimeEvent, Timestamp,
|
||||||
};
|
};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{ConstBool, ConstU32, Nothing},
|
traits::{ConstBool, ConstU32, Nothing},
|
||||||
weights::Weight,
|
|
||||||
};
|
};
|
||||||
use pallet_contracts::{
|
use pallet_contracts::{
|
||||||
weights::{SubstrateWeight, WeightInfo},
|
weights::SubstrateWeight, Config, DefaultAddressGenerator, Frame, Schedule,
|
||||||
Config, DefaultAddressGenerator, Frame, Schedule,
|
|
||||||
};
|
};
|
||||||
pub use parachains_common::AVERAGE_ON_INITIALIZE_RATIO;
|
pub use parachains_common::AVERAGE_ON_INITIALIZE_RATIO;
|
||||||
|
|
||||||
@@ -20,15 +18,6 @@ pub const CONTRACTS_DEBUG_OUTPUT: bool = true;
|
|||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const DepositPerItem: Balance = deposit(1, 0);
|
pub const DepositPerItem: Balance = deposit(1, 0);
|
||||||
pub const DepositPerByte: Balance = deposit(0, 1);
|
pub const DepositPerByte: Balance = deposit(0, 1);
|
||||||
// The lazy deletion runs inside on_initialize.
|
|
||||||
pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *
|
|
||||||
RuntimeBlockWeights::get().max_block;
|
|
||||||
// The weight needed for decoding the queue should be less or equal than a fifth
|
|
||||||
// of the overall weight dedicated to the lazy deletion.
|
|
||||||
pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get().ref_time() / (
|
|
||||||
<Runtime as Config>::WeightInfo::on_initialize_per_queue_item(1).ref_time() -
|
|
||||||
<Runtime as Config>::WeightInfo::on_initialize_per_queue_item(0).ref_time()
|
|
||||||
)) / 5) as u32;
|
|
||||||
pub MySchedule: Schedule<Runtime> = Default::default();
|
pub MySchedule: Schedule<Runtime> = Default::default();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,8 +39,6 @@ impl Config for Runtime {
|
|||||||
type WeightPrice = pallet_transaction_payment::Pallet<Self>;
|
type WeightPrice = pallet_transaction_payment::Pallet<Self>;
|
||||||
type WeightInfo = SubstrateWeight<Self>;
|
type WeightInfo = SubstrateWeight<Self>;
|
||||||
type ChainExtension = ();
|
type ChainExtension = ();
|
||||||
type DeletionQueueDepth = DeletionQueueDepth;
|
|
||||||
type DeletionWeightLimit = DeletionWeightLimit;
|
|
||||||
type Schedule = MySchedule;
|
type Schedule = MySchedule;
|
||||||
type CallStack = [Frame<Self>; 5];
|
type CallStack = [Frame<Self>; 5];
|
||||||
type AddressGenerator = DefaultAddressGenerator;
|
type AddressGenerator = DefaultAddressGenerator;
|
||||||
|
|||||||
Reference in New Issue
Block a user