Bitcoin Core 32.99.0
P2P Digital Currency
Loading...
Searching...
No Matches
fees.cpp
Go to the documentation of this file.
1// Copyright (c) 2020-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#include <common/messages.h>
6#include <consensus/amount.h>
9#include <test/fuzz/fuzz.h>
10#include <test/fuzz/util.h>
11#include <util/fees.h>
12
13#include <cstdint>
14#include <string>
15#include <vector>
16
18
20{
21 FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
23 FastRandomContext rng{/*fDeterministic=*/true};
29 }
31 (void)StringForFeeReason(fee_reason);
37}
bool MoneyRange(const CAmount &nValue)
Definition amount.h:27
int64_t CAmount
Amount in satoshis (Can be negative)
Definition amount.h:12
BlockPolicyEstimateReason
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
Definition feerate.h:32
Fast randomness source.
Definition random.h:386
std::string ConsumeRandomLengthString(size_t max_length)
T PickValueInArray(const T(&array)[size])
#define FUZZ_TARGET(...)
Definition fuzz.h:35
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
Definition fuzz.h:22
is a home for simple string functions returning descriptive messages that are used in RPC and GUI int...
std::string StringForFeeReason(FeeReason reason)
Definition messages.cpp:39
std::string StringForBlockPolicyEstimateReason(BlockPolicyEstimateReason reason)
FastRandomContext rng
CAmount ConsumeMoney(FuzzedDataProvider &fuzzed_data_provider, const std::optional< CAmount > &max) noexcept
Definition util.cpp:29
std::string_view FeeRateEstimatorTypeToString(FeeRateEstimatorType feerate_estimator_type)
Definition fees.cpp:13
std::optional< FeeRateEstimatorType > FeeRateEstimatorTypeFromString(std::string_view feerate_estimator_type)
Definition fees.cpp:27
FeeRateEstimatorType
Identifier for fee rate estimator.
Definition fees.h:37
FeeReason
Definition fees.h:25
@ FEE_RATE_ESTIMATOR
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:82
assert(!tx.IsCoinBase())
FuzzedDataProvider & fuzzed_data_provider
Definition fees.cpp:46