Closes #3134 - Least Authority Issue E

CTxMemPool::check() does nothing when turned on, due to overflow.
This commit is contained in:
Simon
2018-04-10 20:45:36 -07:00
parent 079d9e6a57
commit a0c977ca61
2 changed files with 16 additions and 1 deletions

View File

@@ -212,4 +212,14 @@ BOOST_AUTO_TEST_CASE(RemoveWithoutBranchId) {
BOOST_CHECK_EQUAL(pool.size(), 0);
}
// Test that nCheckFrequency is set correctly when calling setSanityCheck().
// https://github.com/zcash/zcash/issues/3134
BOOST_AUTO_TEST_CASE(SetSanityCheck) {
CTxMemPool pool(CFeeRate(0));
pool.setSanityCheck(1.0);
BOOST_CHECK_EQUAL(pool.GetCheckFrequency(), 4294967295);
pool.setSanityCheck(0);
BOOST_CHECK_EQUAL(pool.GetCheckFrequency(), 0);
}
BOOST_AUTO_TEST_SUITE_END()