12 #include <test/util/blockindex.h>
13 #include <test/util/setup_common.h>
15 #include <boost/test/unit_test.hpp>
19 const bool expectActivation) {
38 block.
nHeight = activationHeight - 1;
41 block.
nHeight = activationHeight;
45 block.
nHeight = activationHeight + 1;
72 checkStakingRewardsActivation(
"regtest",
false);
73 checkStakingRewardsActivation(
"test",
false);
74 checkStakingRewardsActivation(
"main",
true);
bool isAvalancheEnabled(const ArgsManager &argsman)
std::unique_ptr< avalanche::Processor > g_avalanche
Global avalanche instance.
void SelectParams(const std::string &network)
Sets the params returned by Params() to those for the given BIP70 chain name.
const CChainParams & Params()
Return the currently selected parameters.
#define Assert(val)
Identity function.
void ForceSetArg(const std::string &strArg, const std::string &strValue)
void ClearForcedArg(const std::string &strArg)
Remove a forced arg setting, used only in testing.
The block chain is a tree shaped structure starting with the genesis block at the root,...
int nHeight
height of the entry in the chain. The genesis block has height 0
const Consensus::Params & GetConsensus() const
static std::unique_ptr< Processor > MakeProcessor(const ArgsManager &argsman, interfaces::Chain &chain, CConnman *connman, ChainstateManager &chainman, CTxMemPool *mempoolIn, CScheduler &scheduler, bilingual_str &error)
#define BOOST_AUTO_TEST_SUITE_END()
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_AUTO_TEST_CASE(funcName)
#define BOOST_CHECK(expr)
bool IsStakingRewardsActivated(const Consensus::Params ¶ms, const CBlockIndex *pprev)
BOOST_FIXTURE_TEST_SUITE(stakingrewards_tests, StakingRewardsActivationTestingSetup) BOOST_AUTO_TEST_CASE(isstakingrewardsactivated)
Parameters that influence chain consensus.
int cowperthwaiteHeight
Block height at which the Cowperthwaite activation becomes active.
void checkStakingRewardsActivation(const std::string &net, const bool expectActivation)
bool error(const char *fmt, const Args &...args)