mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 22:58:00 +00:00
contracts: Reduce size of deletion queue depth (#11696)
* contracts: Reduce size of deletion queue depth * Remove unused import
This commit is contained in:
committed by
GitHub
parent
10e966e643
commit
0832648372
@@ -47,7 +47,6 @@ use frame_system::{
|
||||
};
|
||||
pub use node_primitives::{AccountId, Signature};
|
||||
use node_primitives::{AccountIndex, Balance, BlockNumber, Hash, Index, Moment};
|
||||
use pallet_contracts::weights::WeightInfo;
|
||||
use pallet_election_provider_multi_phase::SolutionAccuracyOf;
|
||||
use pallet_grandpa::{
|
||||
fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList,
|
||||
@@ -1116,18 +1115,13 @@ parameter_types! {
|
||||
pub const DepositPerItem: Balance = deposit(1, 0);
|
||||
pub const DepositPerByte: Balance = deposit(0, 1);
|
||||
pub const MaxValueSize: u32 = 16 * 1024;
|
||||
pub const DeletionQueueDepth: u32 = 128;
|
||||
// The lazy deletion runs inside on_initialize.
|
||||
pub DeletionWeightLimit: Weight = RuntimeBlockWeights::get()
|
||||
.per_class
|
||||
.get(DispatchClass::Normal)
|
||||
.max_total
|
||||
.unwrap_or(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() / (
|
||||
<Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(1) -
|
||||
<Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(0)
|
||||
)) / 5) as u32;
|
||||
pub Schedule: pallet_contracts::Schedule<Runtime> = Default::default();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user