Skip to main content

RECEIPT_LOG_CAPACITY

Constant RECEIPT_LOG_CAPACITY 

Source
pub const RECEIPT_LOG_CAPACITY: usize = 1024;
Expand description

Capacity of the receipt-writer queue. Receipts are roughly one per voucher interval (~1 MiB served), so this absorbs a large burst of voucher acceptances while a disk stall (a slow or full data_dir, the realistic end-state of #802) is worked off, without ever back-pressuring paid delivery. On overflow the audit receipt is dropped (counted via Metrics::receipt_write_dropped) rather than the payment stalling — the payment already advanced the lane watermark. Rotation (#802) bounds the log on disk; this bounds it in memory.