diff options
author | fanquake <fanquake@gmail.com> | 2021-03-04 20:21:11 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-03-04 20:29:09 +0800 |
commit | 83bdbbd300bb17bef07bc63735a84a0b0ce59958 (patch) | |
tree | 5cb34eb7549aaa27bc66e1f31d13fc917ebabae7 /src/test/fuzz/util.h | |
parent | 7450a01691e84ff44ec065dc0e11f549600d4b66 (diff) | |
parent | fa576b4532814b4bca1936d170cabd01fbc51960 (diff) |
Merge #21003: test: Move MakeNoLogFileContext to libtest_util, and use it in bench
fa576b4532814b4bca1936d170cabd01fbc51960 Move MakeNoLogFileContext to common libtest_util, and use it in bench (MarcoFalke)
Pull request description:
To avoid verbose code duplication, which may lead to accidental mishaps https://github.com/bitcoin/bitcoin/pull/20998/files#r563624041.
Also fix a nit I found in https://github.com/bitcoin/bitcoin/pull/20946#discussion_r561949731.
ACKs for top commit:
dongcarl:
Light Code-Review ACK fa576b4532814b4bca1936d170cabd01fbc51960
fanquake:
ACK fa576b4532814b4bca1936d170cabd01fbc51960
Tree-SHA512: d39ac9c0957813ebb20ed13bd25a8ef8469377ce2651245638bd761c796feac2a17e30dd16f1e5c8db57737fb918c81d56a3d784c33258275e426a1b11e69eb2
Diffstat (limited to 'src/test/fuzz/util.h')
-rw-r--r-- | src/test/fuzz/util.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/test/fuzz/util.h b/src/test/fuzz/util.h index daded0959f..d708dabb49 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> @@ -334,19 +332,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; |