diff options
author | glozow <gloriajzhao@gmail.com> | 2022-04-20 14:04:42 -0700 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2022-05-30 16:00:41 -0700 |
commit | d7d9c7b2661d7f4292bfcdc389a806028fa2207d (patch) | |
tree | 9354589d541272821d3c6f0196241ab16666fcf3 /src | |
parent | b9ef5a10e2fa4609d048db57b99463305455ebe4 (diff) |
[test util] add chain name to TestChain100Setup ctor
This allows calling MakeNoLogFileContext<TestChain100Setup>
Diffstat (limited to 'src')
-rw-r--r-- | src/test/txvalidationcache_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/util/setup_common.cpp | 4 | ||||
-rw-r--r-- | src/test/util/setup_common.h | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/test/txvalidationcache_tests.cpp b/src/test/txvalidationcache_tests.cpp index d41b54af20..dd4bc5af75 100644 --- a/src/test/txvalidationcache_tests.cpp +++ b/src/test/txvalidationcache_tests.cpp @@ -15,7 +15,7 @@ struct Dersig100Setup : public TestChain100Setup { Dersig100Setup() - : TestChain100Setup{{"-testactivationheight=dersig@102"}} {} + : TestChain100Setup{CBaseChainParams::REGTEST, {"-testactivationheight=dersig@102"}} {} }; bool CheckInputScripts(const CTransaction& tx, TxValidationState& state, diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index b7566bd1fa..ba6525ef28 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -242,8 +242,8 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const } } -TestChain100Setup::TestChain100Setup(const std::vector<const char*>& extra_args) - : TestingSetup{CBaseChainParams::REGTEST, extra_args} +TestChain100Setup::TestChain100Setup(const std::string& chain_name, const std::vector<const char*>& extra_args) + : TestingSetup{chain_name, extra_args} { SetMockTime(1598887952); constexpr std::array<unsigned char, 32> vchKey = { diff --git a/src/test/util/setup_common.h b/src/test/util/setup_common.h index a1b7525cf4..dd01afe087 100644 --- a/src/test/util/setup_common.h +++ b/src/test/util/setup_common.h @@ -122,7 +122,8 @@ class CScript; * Testing fixture that pre-creates a 100-block REGTEST-mode block chain */ struct TestChain100Setup : public TestingSetup { - TestChain100Setup(const std::vector<const char*>& extra_args = {}); + TestChain100Setup(const std::string& chain_name = CBaseChainParams::REGTEST, + const std::vector<const char*>& extra_args = {}); /** * Create a new block with just given transactions, coinbase paying to |