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§
sourcefn prepare_message_proof(
params: MessageProofParams<Self::LaneId>,
) -> (FromBridgedChainMessagesProof<HashOf<BridgedChainOf<Self, I>>, Self::LaneId>, Weight)
fn prepare_message_proof( params: MessageProofParams<Self::LaneId>, ) -> (FromBridgedChainMessagesProof<HashOf<BridgedChainOf<Self, I>>, Self::LaneId>, Weight)
Prepare messages proof to receive by the module.
sourcefn prepare_message_delivery_proof(
params: MessageDeliveryProofParams<Self::AccountId, Self::LaneId>,
) -> FromBridgedChainMessagesDeliveryProof<HashOf<BridgedChainOf<Self, I>>, Self::LaneId>
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.
sourcefn is_relayer_rewarded(relayer: &Self::AccountId) -> bool
fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool
Returns true if given relayer has been rewarded for some of its actions.
Provided Methods§
sourcefn bench_lane_id() -> Self::LaneId
fn bench_lane_id() -> Self::LaneId
Lane id to use in benchmarks.
sourcefn bridged_relayer_id() -> AccountIdOf<BridgedChainOf<Self, I>>
fn bridged_relayer_id() -> AccountIdOf<BridgedChainOf<Self, I>>
Return id of relayer account at the bridged chain.
By default, zero account is returned.
sourcefn endow_account(_account: &Self::AccountId)
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.
sourcefn is_message_successfully_dispatched(_nonce: MessageNonce) -> bool
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.