Skip to content

Commit

Permalink
Fix bench test
Browse files Browse the repository at this point in the history
Signed-off-by: georgepisaltu <george.pisaltu@parity.io>
  • Loading branch information
georgepisaltu committed Aug 20, 2024
1 parent 0b5c6e1 commit 40f4791
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions substrate/bin/node/bench/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,24 +121,23 @@ 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
// non-existent account
// - 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 => {
Expand Down

0 comments on commit 40f4791

Please sign in to comment.