Merge pull request #447 from rnicoll/1.7-dev-tests

Fix DoS tests to take into account DigiShield.
This commit is contained in:
langerhans 2014-04-12 21:05:41 +02:00
commit 876578d4ed

View file

@ -137,7 +137,7 @@ BOOST_AUTO_TEST_CASE(DoS_checknbits)
// First checkpoint difficulty at or a while after the last checkpoint time should fail when
// compared to last checkpoint
BOOST_CHECK(!CheckNBits(firstcheck.second, lastcheck.first+60*10, lastcheck.second, lastcheck.first));
BOOST_CHECK(!CheckNBits(firstcheck.second, lastcheck.first+60*60*24*4, lastcheck.second, lastcheck.first));
BOOST_CHECK(!CheckNBits(firstcheck.second, lastcheck.first+60*60*24*3, lastcheck.second, lastcheck.first));
// ... but OK if enough time passed for difficulty to adjust downward:
BOOST_CHECK(CheckNBits(firstcheck.second, lastcheck.first+60*60*24*365*4, lastcheck.second, lastcheck.first));