Struct ckb_tx_pool::pool::TxPool [−][src]
pub struct TxPool { /* fields omitted */ }Expand description
Tx-pool implementation
Implementations
impl TxPool[src]
impl TxPool[src]pub fn new(
config: TxPoolConfig,
snapshot: Arc<Snapshot>,
last_txs_updated_at: Arc<AtomicU64>
) -> TxPool[src]
pub fn new(
config: TxPoolConfig,
snapshot: Arc<Snapshot>,
last_txs_updated_at: Arc<AtomicU64>
) -> TxPool[src]Create new TxPool
pub fn snapshot(&self) -> &Snapshot[src]
pub fn snapshot(&self) -> &Snapshot[src]Tx-pool owned snapshot, it may not consistent with chain cause tx-pool update snapshot asynchronously
pub fn cloned_snapshot(&self) -> Arc<Snapshot>[src]
pub fn cloned_snapshot(&self) -> Arc<Snapshot>[src]Makes a clone of the Arc
pub fn info(&self) -> TxPoolInfo[src]
pub fn info(&self) -> TxPoolInfo[src]Tx-pool information
pub fn reach_size_limit(&self, tx_size: usize) -> bool[src]
pub fn reach_size_limit(&self, tx_size: usize) -> bool[src]Whether Tx-pool reach size limit
pub fn reach_cycles_limit(&self, cycles: Cycle) -> bool[src]
pub fn reach_cycles_limit(&self, cycles: Cycle) -> bool[src]Whether Tx-pool reach cycles limit
pub fn update_statics_for_add_tx(&mut self, tx_size: usize, cycles: Cycle)[src]
pub fn update_statics_for_add_tx(&mut self, tx_size: usize, cycles: Cycle)[src]Update size and cycles statics for add tx
pub fn update_statics_for_remove_tx(&mut self, tx_size: usize, cycles: Cycle)[src]
pub fn update_statics_for_remove_tx(&mut self, tx_size: usize, cycles: Cycle)[src]Update size and cycles statics for remove tx cycles overflow is possible, currently obtaining cycles is not accurate
pub fn add_pending(&mut self, entry: TxEntry) -> Result<bool, Reject>[src]
pub fn add_pending(&mut self, entry: TxEntry) -> Result<bool, Reject>[src]Add tx to pending pool If did have this value present, false is returned.
pub fn add_gap(&mut self, entry: TxEntry) -> Result<bool, Reject>[src]
pub fn add_gap(&mut self, entry: TxEntry) -> Result<bool, Reject>[src]Add tx which proposed but still uncommittable to gap pool
pub fn get_last_txs_updated_at(&self) -> u64[src]
pub fn get_last_txs_updated_at(&self) -> u64[src]Get last txs in tx-pool update timestamp
pub fn contains_proposal_id(&self, id: &ProposalShortId) -> bool[src]
pub fn contains_proposal_id(&self, id: &ProposalShortId) -> bool[src]Returns true if the tx-pool contains a tx with specified id.
pub fn get_tx_with_cycles(
&self,
id: &ProposalShortId
) -> Option<(TransactionView, Cycle)>[src]
pub fn get_tx_with_cycles(
&self,
id: &ProposalShortId
) -> Option<(TransactionView, Cycle)>[src]Returns tx with cycles corresponding to the id.
pub fn get_tx(&self, id: &ProposalShortId) -> Option<&TransactionView>[src]
pub fn get_tx(&self, id: &ProposalShortId) -> Option<&TransactionView>[src]Returns tx corresponding to the id.
pub fn get_tx_without_conflict(
&self,
id: &ProposalShortId
) -> Option<&TransactionView>[src]
pub fn get_tx_without_conflict(
&self,
id: &ProposalShortId
) -> Option<&TransactionView>[src]Returns tx exclude conflict corresponding to the id. RPC
pub fn get_proposals(
&self,
limit: usize,
exclusion: &HashSet<ProposalShortId>
) -> HashSet<ProposalShortId>[src]
pub fn get_proposals(
&self,
limit: usize,
exclusion: &HashSet<ProposalShortId>
) -> HashSet<ProposalShortId>[src]Get to-be-proposal transactions that may be included in the next block.
pub fn get_tx_from_pool_or_store(
&self,
proposal_id: &ProposalShortId
) -> Option<TransactionView>[src]
pub fn get_tx_from_pool_or_store(
&self,
proposal_id: &ProposalShortId
) -> Option<TransactionView>[src]Returns tx from tx-pool or storage corresponding to the id.
Auto Trait Implementations
impl !RefUnwindSafe for TxPool
impl Send for TxPool
impl Sync for TxPool
impl Unpin for TxPool
impl !UnwindSafe for TxPool
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,