Skip to main content

insert_fee_history_cache_item

Function insert_fee_history_cache_item 

Source
pub(crate) fn insert_fee_history_cache_item(
    cache: &FeeHistoryCache,
    item: FeeHistoryCacheItem,
    block_number: Option<u64>,
    fee_history_limit: u64,
)
Expand description

Inserts an entry into the fee history cache and trims it back to fee_history_limit.

Used by the async FeeHistoryService. The eth_feeHistory fallback applies the same bounded insertion policy to a batch under one lock.