Skip to content

Commit

Permalink
style: apply clang format for new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
knst committed Sep 17, 2024
1 parent 425b427 commit c422e37
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
4 changes: 1 addition & 3 deletions src/test/block_reward_reallocation_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ struct TestChainBRRBeforeActivationSetup : public TestChainSetup
{
// Force fast DIP3 activation
TestChainBRRBeforeActivationSetup() :
TestChainSetup(497, {"-dip3params=30:50",
"-testactivationheight=brr@1000",
"-testactivationheight=v20@1200",
TestChainSetup(497, {"-dip3params=30:50", "-testactivationheight=brr@1000", "-testactivationheight=v20@1200",
"-vbparams=mn_rr:0:999999999999:0:20:16:12:5:1"})
{
}
Expand Down
29 changes: 16 additions & 13 deletions src/test/evo_deterministicmns_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -814,43 +814,46 @@ void FuncVerifyDB(TestChainSetup& setup)

BOOST_AUTO_TEST_SUITE(evo_dip3_activation_tests)

struct TestChainDIP3BeforeActivationSetup : public TestChainSetup
{
TestChainDIP3BeforeActivationSetup() : TestChainSetup(430) {}
struct TestChainDIP3BeforeActivationSetup : public TestChainSetup {
TestChainDIP3BeforeActivationSetup() :
TestChainSetup(430)
{
}
};

struct TestChainDIP3Setup : public TestChainDIP3BeforeActivationSetup
{
struct TestChainDIP3Setup : public TestChainDIP3BeforeActivationSetup {
TestChainDIP3Setup()
{
// Activate DIP3 here
CreateAndProcessBlock({}, coinbaseKey);
}
};

struct TestChainV19BeforeActivationSetup : public TestChainSetup
{
struct TestChainV19BeforeActivationSetup : public TestChainSetup {
TestChainV19BeforeActivationSetup();
};

struct TestChainV19Setup : public TestChainV19BeforeActivationSetup
{
struct TestChainV19Setup : public TestChainV19BeforeActivationSetup {
TestChainV19Setup()
{
// Activate V19
for (int i = 0; i < 5; ++i) {
CreateAndProcessBlock({}, coinbaseKey);
}
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)};
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)
TestChainV19BeforeActivationSetup::TestChainV19BeforeActivationSetup() :
TestChainSetup(894)
{
bool v19_active{DeploymentActiveAfter(m_node.chainman->ActiveChain().Tip(), Params().GetConsensus(), Consensus::DEPLOYMENT_V19)};
bool v19_active{DeploymentActiveAfter(m_node.chainman->ActiveChain().Tip(), Params().GetConsensus(),
Consensus::DEPLOYMENT_V19)};
assert(!v19_active);
}

Expand Down

0 comments on commit c422e37

Please sign in to comment.