20 static const auto testing_setup = MakeNoLogFileContext<>();
31 const std::optional<CMutableTransaction> mtx = ConsumeDeserializable<CMutableTransaction>(fuzzed_data_provider);
42 std::vector<CTxMemPoolEntry> mempool_entries;
44 const std::optional<CMutableTransaction> mtx = ConsumeDeserializable<CMutableTransaction>(fuzzed_data_provider);
51 std::vector<const CTxMemPoolEntry*> ptrs;
52 ptrs.reserve(mempool_entries.size());
54 ptrs.push_back(&mempool_entry);
73 CAutoFile fuzzed_auto_file = fuzzed_auto_file_provider.
open();
74 block_policy_estimator.
Write(fuzzed_auto_file);
75 block_policy_estimator.
Read(fuzzed_auto_file);
Non-refcounted RAII wrapper for FILE*.
The BlockPolicyEstimator is used for estimating the feerate needed for a transaction to be included i...
bool Read(CAutoFile &filein)
Read estimation data from a file.
CFeeRate estimateRawFee(int confTarget, double successThreshold, FeeEstimateHorizon horizon, EstimationResult *result=nullptr) const
Return a specific fee estimate calculation with a given success threshold and time horizon,...
bool Write(CAutoFile &fileout) const
Write estimation data to a file.
bool removeTx(uint256 hash, bool inBlock)
Remove a transaction from the mempool tracking stats.
void FlushUnconfirmed()
Empty mempool transactions on shutdown to record failure to confirm for txs still in mempool.
void processTransaction(const CTxMemPoolEntry &entry, bool validFeeEstimate)
Process a transaction accepted to the mempool.
void processBlock(unsigned int nBlockHeight, std::vector< const CTxMemPoolEntry * > &entries)
Process all the transactions that have been included in a block.
CFeeRate estimateSmartFee(int confTarget, FeeCalculation *feeCalc, bool conservative) const
Estimate feerate needed to get be included in a block within confTarget blocks.
unsigned int HighestTargetTracked(FeeEstimateHorizon horizon) const
Calculation of highest target that estimates are tracked for.
CFeeRate estimateFee(int confTarget) const
DEPRECATED.
The basic transaction that is broadcasted on the network and contained in blocks.
CTxMemPoolEntry stores data about the corresponding transaction, as well as data about all in-mempool...
T PickValueInArray(const T(&array)[size])
static constexpr auto ALL_FEE_ESTIMATE_HORIZONS
void initialize_policy_estimator()
FUZZ_TARGET_INIT(policy_estimator, initialize_policy_estimator)
CTxMemPoolEntry ConsumeTxMemPoolEntry(FuzzedDataProvider &fuzzed_data_provider, const CTransaction &tx) noexcept
FuzzedAutoFileProvider ConsumeAutoFile(FuzzedDataProvider &fuzzed_data_provider) noexcept
uint256 ConsumeUInt256(FuzzedDataProvider &fuzzed_data_provider) noexcept
size_t CallOneOf(FuzzedDataProvider &fuzzed_data_provider, Callables... callables)