Relayers pallet: extend payment source id (#1907)

* Add Chain::ID const

* Relayers pallet: extend payment source id

* Addressed code review comments

* Fix benchmarks

* Fix dashboards

* Renamings

* Fix compilation
This commit is contained in:
Serban Iorga
2023-02-28 11:31:54 +02:00
committed by Bastian Köcher
parent f31b5d8634
commit f5fee288b9
37 changed files with 375 additions and 137 deletions
+4 -3
View File
@@ -19,7 +19,7 @@
use crate as pallet_bridge_relayers;
use bp_messages::LaneId;
use bp_relayers::PaymentProcedure;
use bp_relayers::{PaymentProcedure, RewardsAccountOwner, RewardsAccountParams};
use frame_support::{parameter_types, weights::RuntimeDbWeight};
use sp_core::H256;
use sp_runtime::{
@@ -96,7 +96,8 @@ impl pallet_bridge_relayers::Config for TestRuntime {
}
/// Message lane that we're using in tests.
pub const TEST_LANE_ID: LaneId = LaneId([0, 0, 0, 0]);
pub const TEST_REWARDS_ACCOUNT_PARAMS: RewardsAccountParams =
RewardsAccountParams::new(LaneId([0, 0, 0, 0]), *b"test", RewardsAccountOwner::ThisChain);
/// Regular relayer that may receive rewards.
pub const REGULAR_RELAYER: AccountId = 1;
@@ -112,7 +113,7 @@ impl PaymentProcedure<AccountId, Balance> for TestPaymentProcedure {
fn pay_reward(
relayer: &AccountId,
_lane_id: LaneId,
_lane_id: RewardsAccountParams,
_reward: Balance,
) -> Result<(), Self::Error> {
match *relayer {