mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-06-20 01:01:11 +00:00
Fix MaxLockers (#248)
* Fix MaxLockers * fix constants * fix toolchains --------- Co-authored-by: Özgün Özerk <ozgunozerk.elo@gmail.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user