mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
refactor: moves evo-deterministicmns_tests specific code from header
This commit is contained in:
parent
1d96fbf091
commit
3fffb0cab9
@ -814,6 +814,38 @@ void FuncVerifyDB(TestChainSetup& setup)
|
|||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE(evo_dip3_activation_tests)
|
BOOST_AUTO_TEST_SUITE(evo_dip3_activation_tests)
|
||||||
|
|
||||||
|
struct TestChainDIP3Setup : public TestChainSetup
|
||||||
|
{
|
||||||
|
TestChainDIP3Setup() : TestChainSetup(431) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TestChainDIP3BeforeActivationSetup : public TestChainSetup
|
||||||
|
{
|
||||||
|
TestChainDIP3BeforeActivationSetup() : TestChainSetup(430) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TestChainV19BeforeActivationSetup : public TestChainSetup
|
||||||
|
{
|
||||||
|
TestChainV19BeforeActivationSetup();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TestChainV19Setup : public TestChainSetup
|
||||||
|
{
|
||||||
|
TestChainV19Setup() : TestChainSetup(899)
|
||||||
|
{
|
||||||
|
bool v19_just_activated{DeploymentActiveAfter(m_node.chainman->ActiveChain().Tip(), Params().GetConsensus(), Consensus::DEPLOYMENT_V19) &&
|
||||||
|
!DeploymentActiveAt(*m_node.chainman->ActiveChain().Tip(), Params().GetConsensus(), Consensus::DEPLOYMENT_V19)};
|
||||||
|
assert(v19_just_activated);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 5 blocks earlier
|
||||||
|
TestChainV19BeforeActivationSetup::TestChainV19BeforeActivationSetup() : TestChainSetup(894)
|
||||||
|
{
|
||||||
|
bool v19_active{DeploymentActiveAfter(m_node.chainman->ActiveChain().Tip(), Params().GetConsensus(), Consensus::DEPLOYMENT_V19)};
|
||||||
|
assert(!v19_active);
|
||||||
|
}
|
||||||
|
|
||||||
// DIP3 can only be activated with legacy scheme (v19 is activated later)
|
// DIP3 can only be activated with legacy scheme (v19 is activated later)
|
||||||
BOOST_AUTO_TEST_CASE(dip3_activation_legacy)
|
BOOST_AUTO_TEST_CASE(dip3_activation_legacy)
|
||||||
{
|
{
|
||||||
|
@ -571,16 +571,3 @@ CBlock getBlock13b8a()
|
|||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
|
||||||
TestChainV19Setup::TestChainV19Setup() : TestChainSetup(899)
|
|
||||||
{
|
|
||||||
bool v19_just_activated{DeploymentActiveAfter(m_node.chainman->ActiveChain().Tip(), Params().GetConsensus(), Consensus::DEPLOYMENT_V19) &&
|
|
||||||
!DeploymentActiveAt(*m_node.chainman->ActiveChain().Tip(), Params().GetConsensus(), Consensus::DEPLOYMENT_V19)};
|
|
||||||
assert(v19_just_activated);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 5 blocks earlier
|
|
||||||
TestChainV19BeforeActivationSetup::TestChainV19BeforeActivationSetup() : TestChainSetup(894)
|
|
||||||
{
|
|
||||||
bool v19_active{DeploymentActiveAfter(m_node.chainman->ActiveChain().Tip(), Params().GetConsensus(), Consensus::DEPLOYMENT_V19)};
|
|
||||||
assert(!v19_active);
|
|
||||||
}
|
|
||||||
|
@ -183,26 +183,6 @@ struct TestChain100Setup : public TestChainSetup {
|
|||||||
TestChain100Setup(const std::vector<const char*>& extra_args = {});
|
TestChain100Setup(const std::vector<const char*>& extra_args = {});
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TestChainDIP3Setup : public TestChainSetup
|
|
||||||
{
|
|
||||||
TestChainDIP3Setup() : TestChainSetup(431) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TestChainV19Setup : public TestChainSetup
|
|
||||||
{
|
|
||||||
TestChainV19Setup();
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TestChainDIP3BeforeActivationSetup : public TestChainSetup
|
|
||||||
{
|
|
||||||
TestChainDIP3BeforeActivationSetup() : TestChainSetup(430) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TestChainV19BeforeActivationSetup : public TestChainSetup
|
|
||||||
{
|
|
||||||
TestChainV19BeforeActivationSetup();
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a test setup that has disk access to the debug.log file disabled. Can
|
* Make a test setup that has disk access to the debug.log file disabled. Can
|
||||||
* be used in "hot loops", for example fuzzing or benchmarking.
|
* be used in "hot loops", for example fuzzing or benchmarking.
|
||||||
|
Loading…
Reference in New Issue
Block a user