mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 05:11:02 +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
@@ -1108,16 +1108,20 @@ impl_runtime_apis! {
|
||||
}
|
||||
|
||||
impl RelayersConfig for Runtime {
|
||||
fn prepare_environment(
|
||||
fn prepare_rewards_account(
|
||||
account_params: RewardsAccountParams,
|
||||
reward: Balance,
|
||||
) {
|
||||
use frame_support::traits::fungible::Mutate;
|
||||
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: AccountId, balance: Balance) {
|
||||
use frame_support::traits::fungible::Mutate;
|
||||
Balances::mint_into(&account, balance.saturating_add(ExistentialDeposit::get())).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user