Struct vapcore_light::transaction_queue::TransactionQueue [−][src]
Light transaction queue. See module docs for more details.
Implementations
impl TransactionQueue
[src]
pub fn import(
&mut self,
tx: PendingTransaction
) -> Result<ImportDestination, Error>
[src]
&mut self,
tx: PendingTransaction
) -> Result<ImportDestination, Error>
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]
&self,
best_block_number: u64,
best_block_timestamp: u64
) -> Vec<PendingTransaction>
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]
&self,
best_block_number: u64,
best_block_timestamp: u64
) -> Vec<PendingTransaction>
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]
&mut self
) -> UnboundedReceiver<Arc<Vec<H256>>>
Add a transaction queue listener.
pub fn full_transactions_receiver(
&mut self
) -> UnboundedReceiver<Arc<Vec<(H256, TxStatus)>>>
[src]
&mut self
) -> UnboundedReceiver<Arc<Vec<(H256, TxStatus)>>>
Add a transaction queue listener.
Trait Implementations
impl Debug for TransactionQueue
[src]
impl Default for TransactionQueue
[src]
fn default() -> TransactionQueue
[src]
Auto Trait Implementations
impl !RefUnwindSafe for TransactionQueue
impl Send for TransactionQueue
impl Sync for TransactionQueue
impl Unpin for TransactionQueue
impl !UnwindSafe for TransactionQueue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[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]
U: From<T>,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,