From 40f4791a0ae820ea769b9d80130ec75169f5f1f6 Mon Sep 17 00:00:00 2001 From: georgepisaltu Date: Tue, 20 Aug 2024 15:19:25 +0300 Subject: [PATCH] Fix bench test Signed-off-by: georgepisaltu --- substrate/bin/node/bench/src/import.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/substrate/bin/node/bench/src/import.rs b/substrate/bin/node/bench/src/import.rs index 8334d230a8d2..0b972650ef5a 100644 --- a/substrate/bin/node/bench/src/import.rs +++ b/substrate/bin/node/bench/src/import.rs @@ -121,10 +121,10 @@ impl core::Benchmark for ImportBenchmark { .inspect_state(|| { match self.block_type { BlockType::RandomTransfersKeepAlive => { - // should be 10 per signed extrinsic + 1 per unsigned + // should be 9 per signed extrinsic + 1 per unsigned // we have 2 unsigned (timestamp and glutton bloat) while the rest are // signed in the block. - // those 10 events per signed are: + // those 9 events per signed are: // - transaction paid for the transaction payment // - withdraw (Balances::Withdraw) for charging the transaction fee // - new account (System::NewAccount) as we always transfer fund to @@ -132,13 +132,12 @@ impl core::Benchmark for ImportBenchmark { // - endowed (Balances::Endowed) for this new account // - issued (Balances::Issued) as total issuance is increased // - successful transfer (Event::Transfer) for this transfer operation - // - deposit (Balances::Deposit) for depositing the tx fee refund // - 2x deposit (Balances::Deposit and Treasury::Deposit) for depositing // the transaction fee into the treasury // - extrinsic success assert_eq!( kitchensink_runtime::System::events().len(), - (self.block.extrinsics.len() - 2) * 10 + 2, + (self.block.extrinsics.len() - 2) * 9 + 2, ); }, BlockType::Noop => {