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§
Sourcetype DeliveryHelper: EnsureDelivery
type DeliveryHelper: EnsureDelivery
Helper that ensures successful XCM delivery for benchmarks.
Required Methods§
Sourcefn account_to_location(account: Self::AccountId) -> Location
fn account_to_location(account: Self::AccountId) -> Location
Convert an AccountId to an XCM Location for fee charging.
Sourcefn generate_session_keys_and_proof(owner: Self::AccountId) -> (Vec<u8>, Vec<u8>)
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.
Sourcefn setup_validator() -> Self::AccountId
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§
Sourcefn relay_chain_location() -> Location
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.