[test util] add chain name to TestChain100Setup ctor

This allows calling MakeNoLogFileContext<TestChain100Setup>
This commit is contained in:
glozow 2022-04-20 14:04:42 -07:00
parent b9ef5a10e2
commit d7d9c7b266
3 changed files with 5 additions and 4 deletions

View file

@ -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,

View file

@ -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 = {

View file

@ -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