Add Event to Pallet Transaction Payment (#11618)

* add Event to Pallet Transaction Payment

* Fix tests in Pallet Balance

* Fix tests in Pallet Balance/Executive/Asset-tx-payment.

* Fix

* fmt

* Fix

* Fix

* Update Cargo.lock

* Fix tests in executor

* Update frame/transaction-payment/src/lib.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* update the name of the event and fmt.

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
ZhiYong
2022-06-16 09:30:49 +08:00
committed by GitHub
parent b71e180446
commit e252c274c1
14 changed files with 77 additions and 24 deletions
+4 -3
View File
@@ -135,9 +135,10 @@ impl core::Benchmark for ImportBenchmark {
.inspect_state(|| {
match self.block_type {
BlockType::RandomTransfersKeepAlive => {
// should be 7 per signed extrinsic + 1 per unsigned
// should be 8 per signed extrinsic + 1 per unsigned
// we have 1 unsigned and the rest are signed in the block
// those 7 events per signed are:
// those 8 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
@@ -148,7 +149,7 @@ impl core::Benchmark for ImportBenchmark {
// - extrinsic success
assert_eq!(
node_runtime::System::events().len(),
(self.block.extrinsics.len() - 1) * 7 + 1,
(self.block.extrinsics.len() - 1) * 8 + 1,
);
},
BlockType::Noop => {