pub trait DeliveryConfirmationPayments<AccountId> {
    type Error: Debug + Into<&'static str>;

    // Required method
    fn pay_reward(
        lane_id: LaneId,
        messages_relayers: VecDeque<UnrewardedRelayer<AccountId>>,
        confirmation_relayer: &AccountId,
        received_range: &RangeInclusive<MessageNonce>
    ) -> MessageNonce;
}
Expand description

Manages payments that are happening at the source chain during delivery confirmation transaction.

Required Associated Types§

source

type Error: Debug + Into<&'static str>

Error type.

Required Methods§

source

fn pay_reward( lane_id: LaneId, messages_relayers: VecDeque<UnrewardedRelayer<AccountId>>, confirmation_relayer: &AccountId, received_range: &RangeInclusive<MessageNonce> ) -> MessageNonce

Pay rewards for delivering messages to the given relayers.

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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<AccountId> DeliveryConfirmationPayments<AccountId> for ()

§

type Error = &'static str

source§

fn pay_reward( _lane_id: LaneId, _messages_relayers: VecDeque<UnrewardedRelayer<AccountId>>, _confirmation_relayer: &AccountId, _received_range: &RangeInclusive<MessageNonce> ) -> MessageNonce

Implementors§

source§

impl<AccountId> DeliveryConfirmationPayments<AccountId> for ForbidOutboundMessages

§

type Error = &'static str