Skip to content

Commit d7d9c7b

Browse files
committed
[test util] add chain name to TestChain100Setup ctor
This allows calling MakeNoLogFileContext<TestChain100Setup>
1 parent b9ef5a1 commit d7d9c7b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/test/txvalidationcache_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
struct Dersig100Setup : public TestChain100Setup {
1717
Dersig100Setup()
18-
: TestChain100Setup{{"-testactivationheight=dersig@102"}} {}
18+
: TestChain100Setup{CBaseChainParams::REGTEST, {"-testactivationheight=dersig@102"}} {}
1919
};
2020

2121
bool CheckInputScripts(const CTransaction& tx, TxValidationState& state,

src/test/util/setup_common.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
242242
}
243243
}
244244

245-
TestChain100Setup::TestChain100Setup(const std::vector<const char*>& extra_args)
246-
: TestingSetup{CBaseChainParams::REGTEST, extra_args}
245+
TestChain100Setup::TestChain100Setup(const std::string& chain_name, const std::vector<const char*>& extra_args)
246+
: TestingSetup{chain_name, extra_args}
247247
{
248248
SetMockTime(1598887952);
249249
constexpr std::array<unsigned char, 32> vchKey = {

src/test/util/setup_common.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ class CScript;
122122
* Testing fixture that pre-creates a 100-block REGTEST-mode block chain
123123
*/
124124
struct TestChain100Setup : public TestingSetup {
125-
TestChain100Setup(const std::vector<const char*>& extra_args = {});
125+
TestChain100Setup(const std::string& chain_name = CBaseChainParams::REGTEST,
126+
const std::vector<const char*>& extra_args = {});
126127

127128
/**
128129
* Create a new block with just given transactions, coinbase paying to

0 commit comments

Comments
 (0)