26 static const auto testing_setup = MakeNoLogFileContext<>();
27 g_setup = testing_setup.get();
37 uint32_t current_height{0};
38 const auto advance_height{
57 entry.GetTxSize(), entry.GetHeight(),
59 tx_submitted_in_package,
61 tx_has_mempool_parents);
62 block_policy_estimator.processTransaction(tx_info);
64 (void)block_policy_estimator.removeTx(tx.GetHash());
68 std::list<CTxMemPoolEntry> mempool_entries;
79 std::vector<RemovedMempoolTransactionInfo> txs;
80 txs.reserve(mempool_entries.size());
82 txs.emplace_back(mempool_entry);
85 block_policy_estimator.processBlock(txs, current_height);
91 block_policy_estimator.FlushUnconfirmed();
99 (void)block_policy_estimator.estimateRawFee(conf_target, success_threshold, horizon, result_ptr);
105 (void)block_policy_estimator.estimateSmartFee(conf_target, fee_calc_ptr, conservative);
111 AutoFile fuzzed_auto_file{fuzzed_file_provider.open()};
112 block_policy_estimator.Write(fuzzed_auto_file);
113 block_policy_estimator.Read(fuzzed_auto_file);
114 (void)fuzzed_auto_file.
fclose();
static constexpr bool DEFAULT_ACCEPT_STALE_FEE_ESTIMATES
static constexpr auto ALL_FEE_ESTIMATE_HORIZONS
fs::path FeeestPath(const ArgsManager &argsman)
Non-refcounted RAII wrapper for FILE*.
The BlockPolicyEstimator is used for estimating the feerate needed for a transaction to be included i...
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...
static constexpr ExplicitCopyTag ExplicitCopy
T ConsumeIntegralInRange(T min, T max)
T PickValueInArray(const T(&array)[size])
static transaction_identifier FromUint256(const uint256 &id)
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
void initialize_policy_estimator()
FUZZ_TARGET(policy_estimator,.init=initialize_policy_estimator)
static constexpr TransactionSerParams TX_WITH_WITNESS
CTxMemPoolEntry ConsumeTxMemPoolEntry(FuzzedDataProvider &fuzzed_data_provider, const CTransaction &tx, uint32_t max_height) noexcept
uint256 ConsumeUInt256(FuzzedDataProvider &fuzzed_data_provider) noexcept
size_t CallOneOf(FuzzedDataProvider &fuzzed_data_provider, Callables... callables)
FuzzedDataProvider & fuzzed_data_provider