pub struct PrioritizationFeeCache { /* private fields */ }
Expand description
Stores up to MAX_NUM_RECENT_BLOCKS recent block’s prioritization fee,
A separate internal thread service_thread
handles additional tasks when a bank is frozen,
and collecting stats and reporting metrics.
Implementations§
source§impl PrioritizationFeeCache
impl PrioritizationFeeCache
pub fn new(capacity: u64) -> Self
sourcepub fn update<'a>(
&self,
bank: Arc<Bank>,
txs: impl Iterator<Item = &'a SanitizedTransaction>
)
pub fn update<'a>( &self, bank: Arc<Bank>, txs: impl Iterator<Item = &'a SanitizedTransaction> )
Update with a list of transactions’ tx_priority_details and tx_account_locks; Only transactions have both valid priority_detail and account_locks will be used to update fee_cache asynchronously.
sourcepub fn finalize_priority_fee(&self, slot: Slot)
pub fn finalize_priority_fee(&self, slot: Slot)
Finalize prioritization fee when it’s bank is completely replayed from blockstore, by pruning irrelevant accounts to save space, and marking its availability for queries.
sourcepub fn available_block_count(&self) -> usize
pub fn available_block_count(&self) -> usize
Returns number of blocks that have finalized minimum fees collection