pub struct PackageAcceptor { /* private fields */ }Expand description
Package acceptance orchestrator.
Validates and submits transaction packages to the mempool, using aggregate fee evaluation to support CPFP fee-bumping.
Implementations§
Source§impl PackageAcceptor
impl PackageAcceptor
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 package acceptor.
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_package(
&self,
transactions: &[Transaction],
) -> Result<PackageResult, PackageAcceptError>
pub async fn accept_package( &self, transactions: &[Transaction], ) -> Result<PackageResult, PackageAcceptError>
Accept a package of transactions into the mempool.
Transactions should be in topological order (parents before children). If not, the package validator will reject them.
Auto Trait Implementations§
impl Freeze for PackageAcceptor
impl !RefUnwindSafe for PackageAcceptor
impl Send for PackageAcceptor
impl Sync for PackageAcceptor
impl Unpin for PackageAcceptor
impl UnsafeUnpin for PackageAcceptor
impl !UnwindSafe for PackageAcceptor
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