referrerpolicy=no-referrer-when-downgrade

Config

pub trait Config: Config {
    type DeliveryHelper: EnsureDelivery;

    // Required methods
    fn account_to_location(account: Self::AccountId) -> Location;
    fn generate_session_keys_and_proof(
        owner: Self::AccountId,
    ) -> (Vec<u8>, Vec<u8>);
    fn setup_validator() -> Self::AccountId;

    // Provided method
    fn relay_chain_location() -> Location { ... }
}
Expand description

Configuration trait for benchmarking pallet-staking-async-rc-client.

The runtime must implement this trait to provide session keys generation and XCM delivery setup for benchmarking purposes.

Required Associated Types§

Source

type DeliveryHelper: EnsureDelivery

Helper that ensures successful XCM delivery for benchmarks.

Required Methods§

Source

fn account_to_location(account: Self::AccountId) -> Location

Convert an AccountId to an XCM Location for fee charging.

Source

fn generate_session_keys_and_proof(owner: Self::AccountId) -> (Vec<u8>, Vec<u8>)

Generate relay chain session keys and ownership proof for benchmarking.

Returns the SCALE-encoded session keys and SCALE-encoded ownership proof.

Source

fn setup_validator() -> Self::AccountId

Setup a validator account for benchmarking.

Should return an account that:

  • Is registered as a validator in the staking pallet
  • Has sufficient balance for XCM delivery fees

Provided Methods§

Source

fn relay_chain_location() -> Location

The relay chain location for XCM delivery.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§