aboutsummaryrefslogtreecommitdiff
path: root/src/test/pow_tests.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2017-12-28 15:04:08 +0000
committerRoss Nicoll <[email protected]>2018-09-19 19:24:06 +0100
commit1be681a1b97b686f838af90682a57f2030d26015 (patch)
treeb2795e4a1d35004dbfd84d49b07bc54413a2a9e1 /src/test/pow_tests.cpp
parentChange BIP65/66 enforcement to match Dogecoin (#1403) (diff)
downloaddiscoin-1be681a1b97b686f838af90682a57f2030d26015.tar.xz
discoin-1be681a1b97b686f838af90682a57f2030d26015.zip
Modify chain consensus parameters to be height aware (#1396)
* Modify chain consensus parameters to be height aware * Correct implementation of simplified rewards in parameters * Correct max money * Use base block version in IsSuperMajority() instead of full version * Correct mining of blocks in AuxPoW tests * Add in missing pre-AuxPoW consensus checks
Diffstat (limited to 'src/test/pow_tests.cpp')
-rw-r--r--src/test/pow_tests.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/pow_tests.cpp b/src/test/pow_tests.cpp
index a51714ad7..a90e6896b 100644
--- a/src/test/pow_tests.cpp
+++ b/src/test/pow_tests.cpp
@@ -18,7 +18,7 @@ BOOST_FIXTURE_TEST_SUITE(pow_tests, BasicTestingSetup)
/* BOOST_AUTO_TEST_CASE(get_next_work)
{
SelectParams(CBaseChainParams::MAIN);
- const Consensus::Params& params = Params().GetConsensus();
+ const Consensus::Params& params = Params().GetConsensus(0);
int64_t nLastRetargetTime = 1261130161; // Block #30240
CBlockIndex pindexLast;
@@ -33,7 +33,7 @@ BOOST_FIXTURE_TEST_SUITE(pow_tests, BasicTestingSetup)
/* BOOST_AUTO_TEST_CASE(get_next_work_pow_limit)
{
SelectParams(CBaseChainParams::MAIN);
- const Consensus::Params& params = Params().GetConsensus();
+ const Consensus::Params& params = Params().GetConsensus(0);
int64_t nLastRetargetTime = 1231006505; // Block #0
CBlockIndex pindexLast;
@@ -48,7 +48,7 @@ BOOST_FIXTURE_TEST_SUITE(pow_tests, BasicTestingSetup)
/* BOOST_AUTO_TEST_CASE(get_next_work_lower_limit_actual)
{
SelectParams(CBaseChainParams::MAIN);
- const Consensus::Params& params = Params().GetConsensus();
+ const Consensus::Params& params = Params().GetConsensus(0);
int64_t nLastRetargetTime = 1279008237; // Block #66528
CBlockIndex pindexLast;
@@ -63,7 +63,7 @@ BOOST_FIXTURE_TEST_SUITE(pow_tests, BasicTestingSetup)
/* BOOST_AUTO_TEST_CASE(get_next_work_upper_limit_actual)
{
SelectParams(CBaseChainParams::MAIN);
- const Consensus::Params& params = Params().GetConsensus();
+ const Consensus::Params& params = Params().GetConsensus(0);
int64_t nLastRetargetTime = 1263163443; // NOTE: Not an actual block time
CBlockIndex pindexLast;
@@ -76,7 +76,7 @@ BOOST_FIXTURE_TEST_SUITE(pow_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(GetBlockProofEquivalentTime_test)
{
SelectParams(CBaseChainParams::MAIN);
- const Consensus::Params& params = Params().GetConsensus();
+ const Consensus::Params& params = Params().GetConsensus(0);
std::vector<CBlockIndex> blocks(10000);
for (int i = 0; i < 10000; i++) {