Struct floresta_wire::mempool::Mempool
source · pub struct Mempool(/* private fields */);
Expand description
Holds the transactions that we broadcasted and are still in the mempool.
Implementations§
source§impl Mempool
impl Mempool
pub fn new() -> Mempool
sourcepub fn consume_block(&mut self, block: &Block) -> Vec<Transaction>
pub fn consume_block(&mut self, block: &Block) -> Vec<Transaction>
Find all transactions that are in the mempool and were included in the given block. Remove them from the mempool and return them.
sourcepub fn accept_to_mempool(&mut self, transaction: Transaction)
pub fn accept_to_mempool(&mut self, transaction: Transaction)
Add a transaction to the mempool.
sourcepub fn get_from_mempool(&self, id: &Txid) -> Option<&Transaction>
pub fn get_from_mempool(&self, id: &Txid) -> Option<&Transaction>
Get a transaction from the mempool.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Mempool
impl Send for Mempool
impl Sync for Mempool
impl Unpin for Mempool
impl UnwindSafe for Mempool
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more