Skip to content

Commit 1eee2e8

Browse files
committed
implemented OnChargeTransaction interface fully for benchmarking
1 parent c8637be commit 1eee2e8

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

runtime/common/src/payment.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,15 @@ where
156156
}
157157
Ok(())
158158
}
159-
160-
// These two are unused but must satisfy the trait impl
159+
161160
#[cfg(feature = "runtime-benchmarks")]
162-
fn endow_account(_who: &<T>::AccountId, _amount: Self::Balance) {}
161+
fn endow_account(who: &<T>::AccountId, amount: Self::Balance) {
162+
let _ = C::deposit_creating(who, amount);
163+
}
164+
163165
#[cfg(feature = "runtime-benchmarks")]
164166
fn minimum_balance() -> Self::Balance {
165-
Self::Balance::zero()
167+
C::minimum_balance()
166168
}
167169
}
168170

0 commit comments

Comments
 (0)