]> Git Repo - VerusCoin.git/blobdiff - src/test/mempool_tests.cpp
Merge pull request #97 from miketout/dev
[VerusCoin.git] / src / test / mempool_tests.cpp
index 325789572d0326f1976706115a487419f305661a..f448d92e0cdc3b3029df01c3152c0198925b8844 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (c) 2011-2014 The Bitcoin Core developers
 // Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+// file COPYING or https://www.opensource.org/licenses/mit-license.php .
 
 #include "consensus/upgrades.h"
 #include "main.h"
@@ -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()
This page took 0.027491 seconds and 4 git commands to generate.