mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
fix(tests): pass extra_args instead of setting them via ForceSetArg
This commit is contained in:
parent
a124280dfb
commit
f2ac8c4afa
@ -40,13 +40,8 @@ const int window{500}, th_start{400}, th_end{300};
|
|||||||
|
|
||||||
struct TestChainBRRBeforeActivationSetup : public TestChainSetup
|
struct TestChainBRRBeforeActivationSetup : public TestChainSetup
|
||||||
{
|
{
|
||||||
TestChainBRRBeforeActivationSetup() : TestChainSetup(497)
|
|
||||||
{
|
|
||||||
// Force fast DIP3 activation
|
// Force fast DIP3 activation
|
||||||
gArgs.ForceSetArg("-dip3params", "30:50");
|
TestChainBRRBeforeActivationSetup() : TestChainSetup(497, {"-dip3params=30:50"}) {}
|
||||||
SelectParams(CBaseChainParams::REGTEST);
|
|
||||||
gArgs.ForceRemoveArg("dip3params");
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static SimpleUTXOMap BuildSimpleUtxoMap(const std::vector<CTransactionRef>& txs)
|
static SimpleUTXOMap BuildSimpleUtxoMap(const std::vector<CTransactionRef>& txs)
|
||||||
|
@ -34,10 +34,7 @@ static constexpr int threshold(int attempt)
|
|||||||
|
|
||||||
struct TestChainDATSetup : public TestChainSetup
|
struct TestChainDATSetup : public TestChainSetup
|
||||||
{
|
{
|
||||||
TestChainDATSetup() : TestChainSetup(window - 2) {
|
TestChainDATSetup() : TestChainSetup(window - 2, {"-vbparams=testdummy:0:999999999999:100:80:60:5"}) {}
|
||||||
gArgs.ForceSetArg("-vbparams","testdummy:0:999999999999:100:80:60:5");
|
|
||||||
SelectParams(CBaseChainParams::REGTEST);
|
|
||||||
}
|
|
||||||
|
|
||||||
void signal(int num_blocks, bool expected_lockin)
|
void signal(int num_blocks, bool expected_lockin)
|
||||||
{
|
{
|
||||||
|
@ -259,7 +259,8 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TestChainSetup::TestChainSetup(int blockCount)
|
TestChainSetup::TestChainSetup(int blockCount, const std::vector<const char*>& extra_args)
|
||||||
|
: RegTestingSetup(extra_args)
|
||||||
{
|
{
|
||||||
// Generate a 100-block chain:
|
// Generate a 100-block chain:
|
||||||
coinbaseKey.MakeNewKey(true);
|
coinbaseKey.MakeNewKey(true);
|
||||||
|
@ -102,8 +102,8 @@ struct TestingSetup : public ChainTestingSetup {
|
|||||||
|
|
||||||
/** Identical to TestingSetup, but chain set to regtest */
|
/** Identical to TestingSetup, but chain set to regtest */
|
||||||
struct RegTestingSetup : public TestingSetup {
|
struct RegTestingSetup : public TestingSetup {
|
||||||
RegTestingSetup()
|
RegTestingSetup(const std::vector<const char*>& extra_args = {})
|
||||||
: TestingSetup{CBaseChainParams::REGTEST} {}
|
: TestingSetup{CBaseChainParams::REGTEST, extra_args} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class CBlock;
|
class CBlock;
|
||||||
@ -112,7 +112,7 @@ class CScript;
|
|||||||
|
|
||||||
struct TestChainSetup : public RegTestingSetup
|
struct TestChainSetup : public RegTestingSetup
|
||||||
{
|
{
|
||||||
TestChainSetup(int blockCount);
|
TestChainSetup(int blockCount, const std::vector<const char*>& extra_args = {});
|
||||||
~TestChainSetup();
|
~TestChainSetup();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user