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: &Bank,
txs: impl Iterator<Item = &'a SanitizedTransaction>,
)
pub fn update<'a>( &self, bank: &Bank, txs: impl Iterator<Item = &'a SanitizedTransaction>, )
Update with a list of non-vote transactions’ compute_budget_details and account_locks; Only transactions have both valid compute_budget_details and account_locks will be used to update fee_cache asynchronously.
Sourcepub fn finalize_priority_fee(&self, slot: Slot, bank_id: BankId)
pub fn finalize_priority_fee(&self, slot: Slot, bank_id: BankId)
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
pub fn get_prioritization_fees( &self, account_keys: &[Pubkey], ) -> Vec<(Slot, u64)>
Trait Implementations§
Source§impl Debug for PrioritizationFeeCache
impl Debug for PrioritizationFeeCache
Source§impl Default for PrioritizationFeeCache
impl Default for PrioritizationFeeCache
Auto Trait Implementations§
impl Freeze for PrioritizationFeeCache
impl !RefUnwindSafe for PrioritizationFeeCache
impl Send for PrioritizationFeeCache
impl Sync for PrioritizationFeeCache
impl Unpin for PrioritizationFeeCache
impl !UnwindSafe for PrioritizationFeeCache
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more