pub struct LocalTransactionsList { /* private fields */ }
Expand description
Keeps track of local transactions that are in the queue or were mined/dropped recently.
Implementations
sourceimpl LocalTransactionsList
impl LocalTransactionsList
sourcepub fn set_in_chain_checker<F, T>(&mut self, checker: T) where
T: Into<Option<F>>,
F: Fn(&H256) -> bool + Send + Sync + 'static,
pub fn set_in_chain_checker<F, T>(&mut self, checker: T) where
T: Into<Option<F>>,
F: Fn(&H256) -> bool + Send + Sync + 'static,
Set blockchain checker.
The function should return true if transaction is included in chain.
sourcepub fn contains(&self, hash: &H256) -> bool
pub fn contains(&self, hash: &H256) -> bool
Returns true if the transaction is already in local transactions.
sourcepub fn all_transactions(&self) -> &LinkedHashMap<H256, Status>
pub fn all_transactions(&self) -> &LinkedHashMap<H256, Status>
Return a map of all currently stored transactions.
sourcepub fn has_pending(&self) -> bool
pub fn has_pending(&self) -> bool
Returns true if there are pending local transactions.
Trait Implementations
sourceimpl Debug for LocalTransactionsList
impl Debug for LocalTransactionsList
sourceimpl Default for LocalTransactionsList
impl Default for LocalTransactionsList
sourceimpl Listener<VerifiedTransaction> for LocalTransactionsList
impl Listener<VerifiedTransaction> for LocalTransactionsList
sourcefn added(&mut self, tx: &Arc<Transaction>, old: Option<&Arc<Transaction>>)
fn added(&mut self, tx: &Arc<Transaction>, old: Option<&Arc<Transaction>>)
The transaction has been successfuly added to the pool.
If second argument is Some
the transaction has took place of some other transaction
which was already in pool.
NOTE: You won’t be notified about drop of old
transaction separately. Read more
sourcefn rejected<H: Debug + LowerHex>(
&mut self,
tx: &Arc<Transaction>,
reason: &Error<H>
)
fn rejected<H: Debug + LowerHex>(
&mut self,
tx: &Arc<Transaction>,
reason: &Error<H>
)
The transaction was rejected from the pool. It means that it was too cheap to replace any transaction already in the pool. Read more
sourcefn dropped(&mut self, tx: &Arc<Transaction>, new: Option<&Transaction>)
fn dropped(&mut self, tx: &Arc<Transaction>, new: Option<&Transaction>)
The transaction was pushed out from the pool because of the limit.
sourcefn invalid(&mut self, tx: &Arc<Transaction>)
fn invalid(&mut self, tx: &Arc<Transaction>)
The transaction was marked as invalid by executor.
sourcefn canceled(&mut self, tx: &Arc<Transaction>)
fn canceled(&mut self, tx: &Arc<Transaction>)
The transaction has been canceled.
sourcefn culled(&mut self, tx: &Arc<Transaction>)
fn culled(&mut self, tx: &Arc<Transaction>)
The transaction has been culled from the pool.
Auto Trait Implementations
impl !RefUnwindSafe for LocalTransactionsList
impl Send for LocalTransactionsList
impl Sync for LocalTransactionsList
impl Unpin for LocalTransactionsList
impl !UnwindSafe for LocalTransactionsList
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more