5#ifndef BITCOIN_POLICY_FEES_ESTIMATOR_MAN_H
6#define BITCOIN_POLICY_FEES_ESTIMATOR_MAN_H
41 bool read_stale_estimates,
42 const fs::path& mempool_estimator_path,
95 void MempoolTransactionsRemovedForBlock(
const std::shared_ptr<const CBlock>& block,
const std::vector<RemovedMempoolTransactionInfo>& txs_removed_for_block,
unsigned int block_height)
override;
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Implement this to subscribe to events generated in validation and mempool.
Interface for managing multiple Chainstate objects, where each chainstate is associated with chainsta...
Manages fee rate estimators.
std::unique_ptr< MemPoolFeeRateEstimator > m_mempool_estimator
unsigned int BlockPolicyHighestTargetTracked(FeeEstimateHorizon horizon) const
Returns the maximum supported confirmation target of block policy estimator.
virtual util::Expected< FeeRateEstimation, FeeRateEstimationError > GetFeeRateEstimate(int target, bool conservative) const
Get a fee rate estimate from the available fee rate estimators.
FeeRateEstimatorManager(const fs::path &block_policy_path, bool read_stale_estimates, const fs::path &mempool_estimator_path, const CTxMemPool &mempool, ChainstateManager &chainman)
std::vector< MinedBlockStats > MempoolPolicyEstimatorBlocksStats() const
Returns per-block weight statistics for the last MEMPOOL_HEALTH_WINDOW_BLOCKS mined blocks.
void IntervalFlush()
Flush recorded data to disk.
void MempoolTransactionsRemovedForBlock(const std::shared_ptr< const CBlock > &block, const std::vector< RemovedMempoolTransactionInfo > &txs_removed_for_block, unsigned int block_height) override
void TransactionRemovedFromMempool(const CTransactionRef &tx, MemPoolRemovalReason, uint64_t) override
Notifies listeners of a transaction leaving mempool.
virtual unsigned int MaximumTarget() const
Returns the maximum supported confirmation target from all fee rate estimators.
std::unique_ptr< CBlockPolicyEstimator > m_block_policy_estimator
CFeeRate BlockPolicyEstimateRawFee(unsigned int target, double threshold, FeeEstimateHorizon horizon, EstimationResult *buckets) const
Delegate to the block policy estimator's estimateRawFee (used by the estimaterawfee RPC).
void ShutdownFlush()
Flush recorded data to disk as part of shutdown sequence.
void TransactionAddedToMempool(const NewMempoolTransactionInfo &tx, uint64_t) override
Overridden from CValidationInterface.
virtual ~FeeRateEstimatorManager()
Estimate the fee rate required for a transaction to be included in the next block.
The util::Expected class provides a standard way for low-level functions to return either error value...
constexpr std::chrono::hours FEE_FLUSH_INTERVAL
MemPoolRemovalReason
Reason why a transaction was removed from the mempool, this is passed to the notification signal.
std::shared_ptr< const CTransaction > CTransactionRef
FeeRateEstimatorType
Identifier for fee rate estimator.