mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Introduce sensible weight constants (#12868)
* Introduce sensible weight constants * cargo fmt * Remove unused import * Add missing import * ".git/.scripts/bench-bot.sh" pallet dev pallet_lottery Co-authored-by: command-bot <>
This commit is contained in:
@@ -115,7 +115,7 @@ impl FindAuthor<AccountId> for Author11 {
|
||||
parameter_types! {
|
||||
pub BlockWeights: frame_system::limits::BlockWeights =
|
||||
frame_system::limits::BlockWeights::simple_max(
|
||||
frame_support::weights::constants::WEIGHT_PER_SECOND * 2
|
||||
Weight::from_parts(frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND * 2, u64::MAX),
|
||||
);
|
||||
pub static SessionsPerEra: SessionIndex = 3;
|
||||
pub static ExistentialDeposit: Balance = 1;
|
||||
|
||||
@@ -4365,9 +4365,10 @@ mod election_data_provider {
|
||||
#[test]
|
||||
fn targets_2sec_block() {
|
||||
let mut validators = 1000;
|
||||
while <Test as Config>::WeightInfo::get_npos_targets(validators)
|
||||
.all_lt(2u64 * frame_support::weights::constants::WEIGHT_PER_SECOND)
|
||||
{
|
||||
while <Test as Config>::WeightInfo::get_npos_targets(validators).all_lt(Weight::from_parts(
|
||||
2u64 * frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND,
|
||||
u64::MAX,
|
||||
)) {
|
||||
validators += 1;
|
||||
}
|
||||
|
||||
@@ -4384,8 +4385,10 @@ mod election_data_provider {
|
||||
let mut nominators = 1000;
|
||||
|
||||
while <Test as Config>::WeightInfo::get_npos_voters(validators, nominators, slashing_spans)
|
||||
.all_lt(2u64 * frame_support::weights::constants::WEIGHT_PER_SECOND)
|
||||
{
|
||||
.all_lt(Weight::from_parts(
|
||||
2u64 * frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND,
|
||||
u64::MAX,
|
||||
)) {
|
||||
nominators += 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user