Browse Source

tiny test fix for mempool_tests

0.14
Alex Morcos 8 years ago committed by BtcDrak
parent
commit
c5d746ace7
No known key found for this signature in database
GPG Key ID: C26B028A44F111A0
  1. 9
      src/test/mempool_tests.cpp

9
src/test/mempool_tests.cpp

@ -388,7 +388,12 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest) @@ -388,7 +388,12 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
pool.addUnchecked(tx6.GetHash(), entry.Fee(0LL).FromTx(tx6));
BOOST_CHECK_EQUAL(pool.size(), 6);
// Ties are broken by hash
if (tx3.GetHash() < tx6.GetHash())
sortedOrder.push_back(tx6.GetHash().ToString());
else
sortedOrder.insert(sortedOrder.end()-1,tx6.GetHash().ToString());
CheckSort<ancestor_score>(pool, sortedOrder);
CMutableTransaction tx7 = CMutableTransaction();
@ -415,7 +420,11 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest) @@ -415,7 +420,11 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
pool.removeForBlock(vtx, 1, NULL, false);
sortedOrder.erase(sortedOrder.begin()+1);
// Ties are broken by hash
if (tx3.GetHash() < tx6.GetHash())
sortedOrder.pop_back();
else
sortedOrder.erase(sortedOrder.end()-2);
sortedOrder.insert(sortedOrder.begin(), tx7.GetHash().ToString());
CheckSort<ancestor_score>(pool, sortedOrder);
}

Loading…
Cancel
Save