MemPoolFeeRateEstimatorCache

MemPoolFeeRateEstimatorCache holds a cache of recent fee rate estimates. A cached fee rate is only provided while it is not older than CACHE_LIFE and the chain tip has not changed.

Synopsis

Declared in <policy/fees/mempool_estimator.h>

class MemPoolFeeRateEstimatorCache;

Types

NameDescription
FeeRateEstimate A pair of conservative and economical fee rate estimates.

Member Functions

NameDescription
MemPoolFeeRateEstimatorCache [constructor]Constructors
operator= [deleted]Deleted copy assignment; the cache is non-copyable.
Clear Clear cached fee rate estimates.
GetCachedEstimate Returns cached estimates if not stale and computed on tip_hash, nullopt otherwise.
IsStale Returns true if the cache is empty or older than CACHE_LIFE.
Update Update the cache with new estimates computed on tip_hash.