pub struct MempoolAcceptor { /* private fields */ }Expand description
Accept-to-mempool validator.
Orchestrates the full pipeline of checks before admitting a transaction to the mempool.
Implementations§
Source§impl MempoolAcceptor
impl MempoolAcceptor
Sourcepub fn new(
chain_state: Arc<dyn ChainStateStore>,
mempool: Arc<dyn MempoolPort>,
) -> Self
pub fn new( chain_state: Arc<dyn ChainStateStore>, mempool: Arc<dyn MempoolPort>, ) -> Self
Create a new mempool acceptor.
Sourcepub fn with_limits(
chain_state: Arc<dyn ChainStateStore>,
mempool: Arc<dyn MempoolPort>,
limits: MempoolLimits,
) -> Self
pub fn with_limits( chain_state: Arc<dyn ChainStateStore>, mempool: Arc<dyn MempoolPort>, limits: MempoolLimits, ) -> Self
Create a new mempool acceptor with custom limits.
Sourcepub fn set_verify_scripts(&mut self, verify: bool)
pub fn set_verify_scripts(&mut self, verify: bool)
Enable or disable script verification (useful for testing).
Sourcepub async fn accept_transaction(
&self,
tx: &Transaction,
) -> Result<AcceptResult, AcceptError>
pub async fn accept_transaction( &self, tx: &Transaction, ) -> Result<AcceptResult, AcceptError>
Validate and accept a transaction into the mempool.
This is the main entry point — the equivalent of Bitcoin Core’s
AcceptToMemoryPool().
Auto Trait Implementations§
impl Freeze for MempoolAcceptor
impl !RefUnwindSafe for MempoolAcceptor
impl Send for MempoolAcceptor
impl Sync for MempoolAcceptor
impl Unpin for MempoolAcceptor
impl UnsafeUnpin for MempoolAcceptor
impl !UnwindSafe for MempoolAcceptor
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