pub struct NonceAndGasPrice {
    pub strategy: PrioritizationStrategy,
    pub block_base_fee: Option<U256>,
}
Expand description

Simple, gas-price based scoring for transactions.

NOTE: Currently penalization does not apply to new transactions that enter the pool. We might want to store penalization status in some persistent state.

Fields

strategy: PrioritizationStrategy

Strategy for prioritization

block_base_fee: Option<U256>

Block base fee. Exists if the EIP 1559 is activated.

Implementations

Decide if the transaction should even be considered into the pool (if the pool is full).

Used by Verifier to quickly reject transactions that don’t have any chance to get into the pool later on, and save time on more expensive checks like sender recovery, etc.

NOTE The method is never called for zero-gas-price transactions or local transactions (such transactions are always considered to the pool and potentially rejected later on)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

A score of a transaction.

Custom scoring update event type.

Decides on ordering of Ts from a particular sender.

Decides how to deal with two transactions from a sender that seem to occupy the same slot in the queue.

Updates the transaction scores given a list of transactions and a change to previous scoring. NOTE: you can safely assume that both slices have the same length. (i.e. score at index i represents transaction at the same index) Read more

Decides if the transaction should ignore per-sender limit in the pool. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.