pub struct BatchConfig {
pub poll_interval: Duration,
pub max_batch_size: usize,
pub target_block_time: Duration,
pub standard_deadline: Duration,
pub economy_deadline: Duration,
pub max_intent_age: Option<Duration>,
pub fee_options: Vec<PaymentTier>,
pub fee_estimation: FeeEstimationConfig,
}Expand description
Configuration for the background batch processor
Fields§
§poll_interval: DurationHow often the batch processor wakes up to check for ready intents
max_batch_size: usizeMaximum number of intents to include in a single batch
target_block_time: DurationAverage block interval used to derive default delayed tier deadlines.
standard_deadline: DurationHow long standard-tier intents wait before being eligible
economy_deadline: DurationHow long economy-tier intents wait before being eligible
max_intent_age: Option<Duration>Maximum age for a pending intent before it is expired and removed.
Set to None to disable automatic expiry.
fee_options: Vec<PaymentTier>Fee tiers exposed in melt quotes. The configured order defines the
backend-owned fee_index values.
fee_estimation: FeeEstimationConfigFee estimation configuration
Implementations§
Source§impl BatchConfig
impl BatchConfig
Sourcepub fn deadline_for_target_blocks(
tier: PaymentTier,
target_block_time: Duration,
) -> Duration
pub fn deadline_for_target_blocks( tier: PaymentTier, target_block_time: Duration, ) -> Duration
Derive a delayed tier deadline from its advertised confirmation target.
Sourcepub fn tier_for_fee_index(
&self,
fee_index: Option<u32>,
) -> Result<PaymentTier, u32>
pub fn tier_for_fee_index( &self, fee_index: Option<u32>, ) -> Result<PaymentTier, u32>
Resolve a wallet-selected fee index to the configured tier.
Trait Implementations§
Source§impl Clone for BatchConfig
impl Clone for BatchConfig
Source§fn clone(&self) -> BatchConfig
fn clone(&self) -> BatchConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchConfig
impl Debug for BatchConfig
Auto Trait Implementations§
impl Freeze for BatchConfig
impl RefUnwindSafe for BatchConfig
impl Send for BatchConfig
impl Sync for BatchConfig
impl Unpin for BatchConfig
impl UnsafeUnpin for BatchConfig
impl UnwindSafe for BatchConfig
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