referrerpolicy=no-referrer-when-downgrade

Trait xcm_simulator::ServiceQueues

pub trait ServiceQueues {
    type OverweightMessageAddress;

    // Required method
    fn service_queues(weight_limit: Weight) -> Weight;

    // Provided method
    fn execute_overweight(
        _weight_limit: Weight,
        _address: Self::OverweightMessageAddress,
    ) -> Result<Weight, ExecuteOverweightError> { ... }
}
Expand description

Can service queues and execute overweight messages.

Required Associated Types§

type OverweightMessageAddress

Addresses a specific overweight message.

Required Methods§

fn service_queues(weight_limit: Weight) -> Weight

Service all message queues in some fair manner.

  • weight_limit: The maximum amount of dynamic weight that this call can use.

Returns the dynamic weight used by this call; is never greater than weight_limit. Should only be called in top-level runtime entry points like on_initialize or on_idle. Otherwise, stack depth limit errors may be miss-handled.

Provided Methods§

fn execute_overweight( _weight_limit: Weight, _address: Self::OverweightMessageAddress, ) -> Result<Weight, ExecuteOverweightError>

Executes a message that could not be executed by Self::service_queues() because it was temporarily overweight.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<T> ServiceQueues for Pallet<T>
where T: Config,

§

fn execute_overweight( weight_limit: Weight, _: <Pallet<T> as ServiceQueues>::OverweightMessageAddress, ) -> Result<Weight, ExecuteOverweightError>

Execute a single overweight message.

The weight limit must be enough for execute_overweight and the message execution itself.

§

type OverweightMessageAddress = (<<T as Config>::MessageProcessor as ProcessMessage>::Origin, u32, <T as Config>::Size)

§

fn service_queues(weight_limit: Weight) -> Weight

Implementors§

§

impl<OverweightAddr> ServiceQueues for NoopServiceQueues<OverweightAddr>

§

type OverweightMessageAddress = OverweightAddr