referrerpolicy=no-referrer-when-downgrade

Trait pallet_bridge_messages::benchmarking::Config

source ·
pub trait Config<I: 'static>: Config<I> {
    // Required methods
    fn prepare_message_proof(
        params: MessageProofParams<Self::LaneId>,
    ) -> (FromBridgedChainMessagesProof<HashOf<BridgedChainOf<Self, I>>, Self::LaneId>, Weight);
    fn prepare_message_delivery_proof(
        params: MessageDeliveryProofParams<Self::AccountId, Self::LaneId>,
    ) -> FromBridgedChainMessagesDeliveryProof<HashOf<BridgedChainOf<Self, I>>, Self::LaneId>;
    fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool;

    // Provided methods
    fn bench_lane_id() -> Self::LaneId { ... }
    fn bridged_relayer_id() -> AccountIdOf<BridgedChainOf<Self, I>> { ... }
    fn endow_account(_account: &Self::AccountId) { ... }
    fn is_message_successfully_dispatched(_nonce: MessageNonce) -> bool { ... }
}
Expand description

Trait that must be implemented by runtime.

Required Methods§

source

fn prepare_message_proof( params: MessageProofParams<Self::LaneId>, ) -> (FromBridgedChainMessagesProof<HashOf<BridgedChainOf<Self, I>>, Self::LaneId>, Weight)

Prepare messages proof to receive by the module.

source

fn prepare_message_delivery_proof( params: MessageDeliveryProofParams<Self::AccountId, Self::LaneId>, ) -> FromBridgedChainMessagesDeliveryProof<HashOf<BridgedChainOf<Self, I>>, Self::LaneId>

Prepare messages delivery proof to receive by the module.

source

fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool

Returns true if given relayer has been rewarded for some of its actions.

Provided Methods§

source

fn bench_lane_id() -> Self::LaneId

Lane id to use in benchmarks.

source

fn bridged_relayer_id() -> AccountIdOf<BridgedChainOf<Self, I>>

Return id of relayer account at the bridged chain.

By default, zero account is returned.

source

fn endow_account(_account: &Self::AccountId)

Create given account and give it enough balance for test purposes. Used to create relayer account at the target chain. Is strictly necessary when your rewards scheme assumes that the relayer account must exist.

Does nothing by default.

source

fn is_message_successfully_dispatched(_nonce: MessageNonce) -> bool

Returns true if message has been successfully dispatched or not.

Object Safety§

This trait is not object safe.

Implementors§