mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 13:21:01 +00:00
refund extra weight in receive_messages_delivery_proof call (#2031)
This commit is contained in:
committed by
Bastian Köcher
parent
f7380490c0
commit
9e48162df2
@@ -98,12 +98,14 @@ pub trait DeliveryConfirmationPayments<AccountId> {
|
||||
///
|
||||
/// The implementation may also choose to pay reward to the `confirmation_relayer`, which is
|
||||
/// a relayer that has submitted delivery confirmation transaction.
|
||||
///
|
||||
/// Returns number of actually rewarded relayers.
|
||||
fn pay_reward(
|
||||
lane_id: LaneId,
|
||||
messages_relayers: VecDeque<UnrewardedRelayer<AccountId>>,
|
||||
confirmation_relayer: &AccountId,
|
||||
received_range: &RangeInclusive<MessageNonce>,
|
||||
);
|
||||
) -> MessageNonce;
|
||||
}
|
||||
|
||||
impl<AccountId> DeliveryConfirmationPayments<AccountId> for () {
|
||||
@@ -114,8 +116,9 @@ impl<AccountId> DeliveryConfirmationPayments<AccountId> for () {
|
||||
_messages_relayers: VecDeque<UnrewardedRelayer<AccountId>>,
|
||||
_confirmation_relayer: &AccountId,
|
||||
_received_range: &RangeInclusive<MessageNonce>,
|
||||
) {
|
||||
) -> MessageNonce {
|
||||
// this implementation is not rewarding relayers at all
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,6 +205,7 @@ impl<AccountId> DeliveryConfirmationPayments<AccountId> for ForbidOutboundMessag
|
||||
_messages_relayers: VecDeque<UnrewardedRelayer<AccountId>>,
|
||||
_confirmation_relayer: &AccountId,
|
||||
_received_range: &RangeInclusive<MessageNonce>,
|
||||
) {
|
||||
) -> MessageNonce {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user