Struct vapcore_light::transaction_queue::TransactionQueue[][src]

pub struct TransactionQueue { /* fields omitted */ }

Light transaction queue. See module docs for more details.

Implementations

impl TransactionQueue[src]

pub fn import(
    &mut self,
    tx: PendingTransaction
) -> Result<ImportDestination, Error>
[src]

Import a pending transaction to be queued.

pub fn transaction(&self, hash: &H256) -> Option<SignedTransaction>[src]

Get pending transaction by hash.

pub fn next_nonce(&self, address: &Address) -> Option<U256>[src]

Get the next nonce for a given address based on what’s within the queue. If the address has no queued transactions, then None will be returned and the next nonce will have to be deduced via other means.

pub fn ready_transactions(
    &self,
    best_block_number: u64,
    best_block_timestamp: u64
) -> Vec<PendingTransaction>
[src]

Get all transactions ready to be propagated. best_block_number and best_block_timestamp are used to filter out conditionally propagated transactions.

Returned transactions are batched by sender, in order of ascending nonce.

pub fn future_transactions(
    &self,
    best_block_number: u64,
    best_block_timestamp: u64
) -> Vec<PendingTransaction>
[src]

Get all transactions not ready to be propagated. best_block_number and best_block_timestamp are used to filter out conditionally propagated transactions.

Returned transactions are batched by sender, in order of ascending nonce.

pub fn queued_senders(&self) -> Vec<Address>[src]

Addresses for which we store transactions.

pub fn cull(&mut self, address: Address, cur_nonce: U256)[src]

Cull out all transactions by the given address which are invalidated by the given nonce.

pub fn get(&self, hash: &H256) -> Option<&PendingTransaction>[src]

Get a transaction by hash.

pub fn pending_transactions_receiver(
    &mut self
) -> UnboundedReceiver<Arc<Vec<H256>>>
[src]

Add a transaction queue listener.

pub fn full_transactions_receiver(
    &mut self
) -> UnboundedReceiver<Arc<Vec<(H256, TxStatus)>>>
[src]

Add a transaction queue listener.

Trait Implementations

impl Debug for TransactionQueue[src]

impl Default for TransactionQueue[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,