Struct ckb_tx_pool::pool::TxPool [−][src]
pub struct TxPool {
pub recent_reject: Option<RecentReject>,
// some fields omitted
}Expand description
Tx-pool implementation
Fields
recent_reject: Option<RecentReject>record recent reject
Implementations
Create new TxPool
Tx-pool owned snapshot, it may not consistent with chain cause tx-pool update snapshot asynchronously
Makes a clone of the Arc
Whether Tx-pool reach size limit
Whether Tx-pool reach cycles limit
Update size and cycles statics for add tx
Update size and cycles statics for remove tx cycles overflow is possible, currently obtaining cycles is not accurate
Add tx to pending pool If did have this value present, false is returned.
Add tx which proposed but still uncommittable to gap pool
Get last txs in tx-pool update timestamp
Returns true if the tx-pool contains a tx with specified id.
Returns tx with cycles corresponding to the id.
Returns tx corresponding to the id.
pub fn get_tx_from_pending_or_else_gap(
&self,
id: &ProposalShortId
) -> Option<&TransactionView>
pub fn get_tx_from_pending_or_else_gap(
&self,
id: &ProposalShortId
) -> Option<&TransactionView>
Returns tx from pending and gap corresponding to the id. RPC
pub fn get_proposals(
&self,
limit: usize,
exclusion: &HashSet<ProposalShortId>
) -> HashSet<ProposalShortId>
pub fn get_proposals(
&self,
limit: usize,
exclusion: &HashSet<ProposalShortId>
) -> HashSet<ProposalShortId>
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>
pub fn get_tx_from_pool_or_store(
&self,
proposal_id: &ProposalShortId
) -> Option<TransactionView>
Returns tx from tx-pool or storage corresponding to the id.