diff options
| author | Ross Nicoll <[email protected]> | 2018-09-30 15:38:37 +0100 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2019-04-03 05:16:26 +0000 |
| commit | 8ef665d5e4765366b1c47a2ce7054d783ccca9d0 (patch) | |
| tree | eb4deddbdbf40cc6e328dc88d3ae21d76332da9a /src/test/pow_tests.cpp | |
| parent | Add Dogecoin block subsidy calculations. (diff) | |
| download | discoin-8ef665d5e4765366b1c47a2ce7054d783ccca9d0.tar.xz discoin-8ef665d5e4765366b1c47a2ce7054d783ccca9d0.zip | |
Replace test data with Dogecoin values
Replace test data with Dogecoin equivalents in the folowing tests:
* base58
* bip32
* keys
* miner
* pow
* wallet
Replace RPC and deterministic signatures in unit tests with Dogecoin values. While
conventionally I'd use an alternative implementation for these, as RFC 6979
compliant signature generation isn't terribly common, and there's no reason
to suspect we've modified this code, I'm going to assert that it's good enough
to test that the code doesn't provide different values.
Disabled Bitcoin PoW tests, but left code in place to simplify later merges. These are
replaced by the Dogecoin PoW tests.
Diffstat (limited to 'src/test/pow_tests.cpp')
| -rw-r--r-- | src/test/pow_tests.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/test/pow_tests.cpp b/src/test/pow_tests.cpp index 1ac9adc74..b061c6f24 100644 --- a/src/test/pow_tests.cpp +++ b/src/test/pow_tests.cpp @@ -14,7 +14,8 @@ BOOST_FIXTURE_TEST_SUITE(pow_tests, BasicTestingSetup) /* Test calculation of next difficulty target with no constraints applying */ -BOOST_AUTO_TEST_CASE(get_next_work) +// Replaced by Dogecoin-specific PoW test +/* BOOST_AUTO_TEST_CASE(get_next_work) { const auto chainParams = CreateChainParams(CBaseChainParams::MAIN); int64_t nLastRetargetTime = 1261130161; // Block #30240 @@ -23,10 +24,11 @@ BOOST_AUTO_TEST_CASE(get_next_work) pindexLast.nTime = 1262152739; // Block #32255 pindexLast.nBits = 0x1d00ffff; BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, chainParams->GetConsensus()), 0x1d00d86aU); -} +} */ /* Test the constraint on the upper bound for next work */ -BOOST_AUTO_TEST_CASE(get_next_work_pow_limit) +// Replaced by Dogecoin-specific PoW test +/* BOOST_AUTO_TEST_CASE(get_next_work_pow_limit) { const auto chainParams = CreateChainParams(CBaseChainParams::MAIN); int64_t nLastRetargetTime = 1231006505; // Block #0 @@ -35,10 +37,11 @@ BOOST_AUTO_TEST_CASE(get_next_work_pow_limit) pindexLast.nTime = 1233061996; // Block #2015 pindexLast.nBits = 0x1d00ffff; BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, chainParams->GetConsensus()), 0x1d00ffffU); -} +} */ /* Test the constraint on the lower bound for actual time taken */ -BOOST_AUTO_TEST_CASE(get_next_work_lower_limit_actual) +// Replaced by Dogecoin-specific PoW test +/* BOOST_AUTO_TEST_CASE(get_next_work_lower_limit_actual) { const auto chainParams = CreateChainParams(CBaseChainParams::MAIN); int64_t nLastRetargetTime = 1279008237; // Block #66528 @@ -47,10 +50,11 @@ BOOST_AUTO_TEST_CASE(get_next_work_lower_limit_actual) pindexLast.nTime = 1279297671; // Block #68543 pindexLast.nBits = 0x1c05a3f4; BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, chainParams->GetConsensus()), 0x1c0168fdU); -} +} */ /* Test the constraint on the upper bound for actual time taken */ -BOOST_AUTO_TEST_CASE(get_next_work_upper_limit_actual) +// Replaced by Dogecoin-specific PoW test +/* BOOST_AUTO_TEST_CASE(get_next_work_upper_limit_actual) { const auto chainParams = CreateChainParams(CBaseChainParams::MAIN); int64_t nLastRetargetTime = 1263163443; // NOTE: Not an actual block time @@ -59,7 +63,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_upper_limit_actual) pindexLast.nTime = 1269211443; // Block #46367 pindexLast.nBits = 0x1c387f6f; BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, chainParams->GetConsensus()), 0x1d00e1fdU); -} +} */ BOOST_AUTO_TEST_CASE(GetBlockProofEquivalentTime_test) { |