diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-01-25 12:22:03 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-03-03 09:17:37 +0100 |
commit | fa576b4532814b4bca1936d170cabd01fbc51960 (patch) | |
tree | 406f945a0fa46f6750f6a563e311c88932673f97 /src/test/fuzz | |
parent | cfce346508f1f7513a0cfa2cea7d7f8336d01c6b (diff) | |
download | bitcoin-fa576b4532814b4bca1936d170cabd01fbc51960.tar.xz |
Move MakeNoLogFileContext to common libtest_util, and use it in bench
Can be reviewed with --color-moved=dimmed-zebra
Diffstat (limited to 'src/test/fuzz')
-rw-r--r-- | src/test/fuzz/banman.cpp | 1 | ||||
-rw-r--r-- | src/test/fuzz/coins_view.cpp | 1 | ||||
-rw-r--r-- | src/test/fuzz/connman.cpp | 1 | ||||
-rw-r--r-- | src/test/fuzz/data_stream.cpp | 1 | ||||
-rw-r--r-- | src/test/fuzz/policy_estimator.cpp | 1 | ||||
-rw-r--r-- | src/test/fuzz/policy_estimator_io.cpp | 1 | ||||
-rw-r--r-- | src/test/fuzz/signet.cpp | 1 | ||||
-rw-r--r-- | src/test/fuzz/util.h | 15 |
8 files changed, 7 insertions, 15 deletions
diff --git a/src/test/fuzz/banman.cpp b/src/test/fuzz/banman.cpp index 124439559e..8bf484722c 100644 --- a/src/test/fuzz/banman.cpp +++ b/src/test/fuzz/banman.cpp @@ -8,6 +8,7 @@ #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> +#include <test/util/setup_common.h> #include <util/system.h> #include <cstdint> diff --git a/src/test/fuzz/coins_view.cpp b/src/test/fuzz/coins_view.cpp index 19486365f6..328a31f1dc 100644 --- a/src/test/fuzz/coins_view.cpp +++ b/src/test/fuzz/coins_view.cpp @@ -16,6 +16,7 @@ #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> +#include <test/util/setup_common.h> #include <validation.h> #include <cstdint> diff --git a/src/test/fuzz/connman.cpp b/src/test/fuzz/connman.cpp index 3fb8d8ca06..f457201091 100644 --- a/src/test/fuzz/connman.cpp +++ b/src/test/fuzz/connman.cpp @@ -10,6 +10,7 @@ #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> +#include <test/util/setup_common.h> #include <util/translation.h> #include <cstdint> diff --git a/src/test/fuzz/data_stream.cpp b/src/test/fuzz/data_stream.cpp index d6ef0c6691..473caec6ff 100644 --- a/src/test/fuzz/data_stream.cpp +++ b/src/test/fuzz/data_stream.cpp @@ -7,6 +7,7 @@ #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> +#include <test/util/setup_common.h> #include <cstdint> #include <vector> diff --git a/src/test/fuzz/policy_estimator.cpp b/src/test/fuzz/policy_estimator.cpp index 311550f041..116b7a71d9 100644 --- a/src/test/fuzz/policy_estimator.cpp +++ b/src/test/fuzz/policy_estimator.cpp @@ -7,6 +7,7 @@ #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> +#include <test/util/setup_common.h> #include <txmempool.h> #include <cstdint> diff --git a/src/test/fuzz/policy_estimator_io.cpp b/src/test/fuzz/policy_estimator_io.cpp index c24ad3d49a..9021d95954 100644 --- a/src/test/fuzz/policy_estimator_io.cpp +++ b/src/test/fuzz/policy_estimator_io.cpp @@ -6,6 +6,7 @@ #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> +#include <test/util/setup_common.h> #include <cstdint> #include <vector> diff --git a/src/test/fuzz/signet.cpp b/src/test/fuzz/signet.cpp index 0d1999731f..303dcf13e3 100644 --- a/src/test/fuzz/signet.cpp +++ b/src/test/fuzz/signet.cpp @@ -10,6 +10,7 @@ #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> +#include <test/util/setup_common.h> #include <cstdint> #include <optional> diff --git a/src/test/fuzz/util.h b/src/test/fuzz/util.h index f3bc3c78ab..5065cde06b 100644 --- a/src/test/fuzz/util.h +++ b/src/test/fuzz/util.h @@ -23,11 +23,9 @@ #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/util/net.h> -#include <test/util/setup_common.h> #include <txmempool.h> #include <uint256.h> #include <util/time.h> -#include <util/vector.h> #include <version.h> #include <algorithm> @@ -324,19 +322,6 @@ inline std::unique_ptr<CNode> ConsumeNodeAsUniquePtr(FuzzedDataProvider& fdp, co void FillNode(FuzzedDataProvider& fuzzed_data_provider, CNode& node, bool init_version) noexcept; -template <class T = const BasicTestingSetup> -std::unique_ptr<T> MakeNoLogFileContext(const std::string& chain_name = CBaseChainParams::REGTEST, const std::vector<const char*>& extra_args = {}) -{ - // Prepend default arguments for fuzzing - const std::vector<const char*> arguments = Cat( - { - "-nodebuglogfile", - }, - extra_args); - - return MakeUnique<T>(chain_name, arguments); -} - class FuzzedFileProvider { FuzzedDataProvider& m_fuzzed_data_provider; |