aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-08-27 22:35:14 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2014-08-27 22:39:28 +0200
commitd1062e32fa66db44d0302bbff9d5634f5c698155 (patch)
tree5b7db2bc339f6d474594c8fe77b710751cdbb5cd /src/test
parentcd3d80be677a3e9c4e1373c364c65f9d09439021 (diff)
parent654871d43677947d124673c9e0dd2984f0d3ca61 (diff)
Merge pull request #4377
654871d replace ComputeMinWork with CheckMinWork (jtimon) b343c1a Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits) (jtimon) c2c02f3 Move UpdateTime to pow (jtimon)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/DoS_tests.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index 4ecf6e2535..8fa38c3605 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -107,11 +107,7 @@ static bool CheckNBits(unsigned int nbits1, int64_t time1, unsigned int nbits2,
return CheckNBits(nbits2, time2, nbits1, time1);
int64_t deltaTime = time2-time1;
- uint256 required;
- required.SetCompact(ComputeMinWork(nbits1, deltaTime));
- uint256 have;
- have.SetCompact(nbits2);
- return (have <= required);
+ return CheckMinWork(nbits2, nbits1, deltaTime);
}
BOOST_AUTO_TEST_CASE(DoS_checknbits)