Fix MaxLockers (#248)

* Fix MaxLockers

* fix constants

* fix toolchains

---------

Co-authored-by: Özgün Özerk <ozgunozerk.elo@gmail.com>
This commit is contained in:
Nikita Khateev
2024-07-23 16:24:52 +04:00
committed by GitHub
parent 02b6611ec2
commit 592c3b694d
15 changed files with 18 additions and 26 deletions
-7
View File
@@ -96,7 +96,6 @@ fn main() {
let mut elapsed: Duration = Duration::ZERO;
let start_block = |block: u32, lapse: u32| {
#[cfg(not(fuzzing))]
println!("\ninitializing block {}", block + lapse);
let next_block = block + lapse;
@@ -197,20 +196,17 @@ fn main() {
current_weight = current_weight.saturating_add(call_weight);
if current_weight.ref_time() >= max_weight.ref_time() {
#[cfg(not(fuzzing))]
println!("Skipping because of max weight {max_weight}");
continue;
}
externalities.execute_with(|| {
let origin_account = endowed_accounts[origin % endowed_accounts.len()];
#[cfg(not(fuzzing))]
{
println!("\n origin: {origin_account:?}");
println!(" call: {extrinsic:?}");
}
let _res = extrinsic.clone().dispatch(RuntimeOrigin::signed(origin_account));
#[cfg(not(fuzzing))]
println!(" result: {_res:?}");
// Uncomment to print events for debugging purposes
@@ -228,7 +224,6 @@ fn main() {
elapsed += now.elapsed();
}
#[cfg(not(fuzzing))]
println!("\n time spent: {elapsed:?}");
assert!(elapsed.as_secs() <= MAX_TIME_FOR_BLOCK, "block execution took too much time");
@@ -237,7 +232,6 @@ fn main() {
// Finilization
Executive::finalize_block();
// Invariants
#[cfg(not(fuzzing))]
println!("\ntesting invariants for block {current_block}");
<AllPalletsWithSystem as TryState<BlockNumber>>::try_state(
current_block,
@@ -287,7 +281,6 @@ fn main() {
"Inconsistent total issuance: {total_issuance} but counted {counted_issuance}"
);
#[cfg(not(fuzzing))]
println!("running integrity tests");
// We run all developer-defined integrity tests
<AllPalletsWithSystem as IntegrityTest>::integrity_test();