mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 13:21:01 +00:00
Benchmarks for new relayers pallet calls (#2040)
* slash relayer balance for invalid transactions * require some gap before unstake is possible * more clippy * log priority boost * add issue ref to TODO * fix typo * is_message_delivery_call -> is_receive_messages_proof_call * moved is_receive_messages_proof_call above * only slash relayers for priority transactions * benchmarks for new relayers pallet calls * generated weights * regenerated weights afer master merge * actually use weights
This commit is contained in:
committed by
Bastian Köcher
parent
f7cc060d9b
commit
1f738f1389
@@ -118,13 +118,16 @@ impl pallet_bridge_relayers::Config for TestRuntime {
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl pallet_bridge_relayers::benchmarking::Config for TestRuntime {
|
||||
fn prepare_environment(account_params: RewardsAccountParams, reward: Balance) {
|
||||
use frame_support::traits::fungible::Mutate;
|
||||
fn prepare_rewards_account(account_params: RewardsAccountParams, reward: Balance) {
|
||||
let rewards_account =
|
||||
bp_relayers::PayRewardFromAccount::<Balances, AccountId>::rewards_account(
|
||||
account_params,
|
||||
);
|
||||
Balances::mint_into(&rewards_account, reward).unwrap();
|
||||
Self::deposit_account(rewards_account, reward);
|
||||
}
|
||||
|
||||
fn deposit_account(account: Self::AccountId, balance: Self::Reward) {
|
||||
Balances::mint_into(&account, balance.saturating_add(ExistentialDeposit::get())).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user