Bitcoin Core 32.99.0
P2P Digital Currency
Loading...
Searching...
No Matches
kitchen_sink.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 <merkleblock.h>
7#include <node/types.h>
8#include <outputtype.h>
10#include <rpc/util.h>
12#include <test/fuzz/fuzz.h>
13#include <test/fuzz/util.h>
14#include <util/check.h>
15#include <util/translation.h>
16
17#include <cstdint>
18#include <optional>
19#include <string>
20#include <vector>
21
24
25namespace {
27 TransactionError::MISSING_INPUTS,
28 TransactionError::ALREADY_IN_UTXO_SET,
29 TransactionError::MEMPOOL_REJECTED,
30 TransactionError::MEMPOOL_ERROR,
31 TransactionError::MAX_FEE_EXCEEDED,
32 TransactionError::MAX_FEE_RATE_EXCEEDED,
33};
34}; // namespace
35
36// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
37// fuzzed but a.) don't belong in any existing fuzzing harness file, and
38// b.) are not important enough to warrant their own fuzzing harness file.
constexpr auto ALL_FEE_ESTIMATE_HORIZONS
std::string ConsumeRandomLengthString(size_t max_length)
T PickValueInArray(const T(&array)[size])
#define FUZZ_TARGET(...)
Definition fuzz.h:35
std::vector< unsigned char > BitsToBytes(const std::vector< bool > &bits)
std::vector< bool > BytesToBits(const std::vector< unsigned char > &bytes)
is a home for simple string functions returning descriptive messages that are used in RPC and GUI int...
bilingual_str TransactionErrorString(const TransactionError err)
Definition messages.cpp:129
TransactionError
Definition types.h:19
is a home for public enum and struct type definitions that are used internally by node code,...
std::optional< OutputType > ParseOutputType(std::string_view type)
const std::string & FormatOutputType(OutputType type)
OutputType
Definition outputtype.h:18
constexpr auto OUTPUT_TYPES
Definition outputtype.h:26
std::string StringForFeeEstimateHorizon(FeeEstimateHorizon horizon)
UniValue JSONRPCTransactionError(TransactionError terr, const std::string &err_string)
Definition util.cpp:416
RPCErrorCode RPCErrorFromTransactionError(TransactionError terr)
Definition util.cpp:397
std::vector< B > ConsumeRandomLengthByteVector(FuzzedDataProvider &fuzzed_data_provider, const std::optional< size_t > &max_length=std::nullopt) noexcept
Definition util.h:63
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