[−][src]Struct grin_pool::transaction_pool::TransactionPool
Transaction pool implementation.
Fields
config: PoolConfig
Pool Config
txpool: Pool
Our transaction pool.
stempool: Pool
Our Dandelion "stempool".
reorg_cache: Arc<RwLock<VecDeque<PoolEntry>>>
Cache of previous txs in case of a re-org.
blockchain: Arc<dyn BlockChain>
The blockchain
verifier_cache: Arc<RwLock<dyn VerifierCache>>
adapter: Arc<dyn PoolAdapter>
The pool adapter
Methods
impl TransactionPool
[src]
impl TransactionPool
pub fn new( | [src] |
Create a new transaction pool
pub fn chain_head(&self) -> Result<BlockHeader, PoolError> | [src] |
pub fn add_to_pool( | [src] |
Add the given tx to the pool, directing it to either the stempool or txpool based on stem flag provided.
pub fn truncate_reorg_cache(&mut self, cutoff: DateTime<Utc>) | [src] |
pub fn reconcile_reorg_cache( | [src] |
pub fn reconcile_block(&mut self, block: &Block) -> Result<(), PoolError> | [src] |
Reconcile the transaction pool (both txpool and stempool) against the provided block.
pub fn retrieve_tx_by_kernel_hash(&self, hash: Hash) -> Option<Transaction> | [src] |
Retrieve individual transaction for the given kernel hash.
pub fn retrieve_transactions( | [src] |
Retrieve all transactions matching the provided "compact block" based on the kernel set. Note: we only look in the txpool for this (stempool is under embargo).
pub fn total_size(&self) -> usize | [src] |
Get the total size of the pool. Note: we only consider the txpool here as stempool is under embargo.
pub fn prepare_mineable_transactions( | [src] |
Returns a vector of transactions from the txpool so we can build a block from them.
Auto Trait Implementations
impl Send for TransactionPool
impl Send for TransactionPool
impl Sync for TransactionPool
impl Sync for TransactionPool
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> UnsafeAny for T where
T: Any,
impl<T> UnsafeAny for T where
T: Any,
impl<T> Erased for T
impl<T> Erased for T
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self