@@ -191,7 +191,7 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
191
191
CheckSort<descendant_score>(pool, sortedOrder);
192
192
193
193
CTxMemPool::setEntries setAncestors;
194
- setAncestors.insert (pool.mapTx . find (tx6.GetHash ()));
194
+ setAncestors.insert (pool.GetIter (tx6.GetHash ()). value ( ));
195
195
CMutableTransaction tx7 = CMutableTransaction ();
196
196
tx7.vin .resize (1 );
197
197
tx7.vin [0 ].prevout = COutPoint (tx6.GetHash (), 0 );
@@ -223,7 +223,7 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
223
223
tx8.vout .resize (1 );
224
224
tx8.vout [0 ].scriptPubKey = CScript () << OP_11 << OP_EQUAL;
225
225
tx8.vout [0 ].nValue = 10 * COIN;
226
- setAncestors.insert (pool.mapTx . find (tx7.GetHash ()));
226
+ setAncestors.insert (pool.GetIter (tx7.GetHash ()). value ( ));
227
227
pool.addUnchecked (entry.Fee (0LL ).Time (NodeSeconds{2s}).FromTx (tx8), setAncestors);
228
228
229
229
// Now tx8 should be sorted low, but tx6/tx both high
@@ -247,8 +247,8 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
247
247
248
248
std::vector<std::string> snapshotOrder = sortedOrder;
249
249
250
- setAncestors.insert (pool.mapTx . find (tx8.GetHash ()));
251
- setAncestors.insert (pool.mapTx . find (tx9.GetHash ()));
250
+ setAncestors.insert (pool.GetIter (tx8.GetHash ()). value ( ));
251
+ setAncestors.insert (pool.GetIter (tx9.GetHash ()). value ( ));
252
252
/* tx10 depends on tx8 and tx9 and has a high fee*/
253
253
CMutableTransaction tx10 = CMutableTransaction ();
254
254
tx10.vin .resize (2 );
@@ -291,11 +291,11 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
291
291
BOOST_CHECK_EQUAL (pool.size (), 10U );
292
292
293
293
// Now try removing tx10 and verify the sort order returns to normal
294
- pool.removeRecursive (pool.mapTx . find (tx10.GetHash ())-> GetTx ( ), REMOVAL_REASON_DUMMY);
294
+ pool.removeRecursive (* Assert ( pool.get (tx10.GetHash ())), REMOVAL_REASON_DUMMY);
295
295
CheckSort<descendant_score>(pool, snapshotOrder);
296
296
297
- pool.removeRecursive (pool.mapTx . find (tx9.GetHash ())-> GetTx ( ), REMOVAL_REASON_DUMMY);
298
- pool.removeRecursive (pool.mapTx . find (tx8.GetHash ())-> GetTx ( ), REMOVAL_REASON_DUMMY);
297
+ pool.removeRecursive (* Assert ( pool.get (tx9.GetHash ())), REMOVAL_REASON_DUMMY);
298
+ pool.removeRecursive (* Assert ( pool.get (tx8.GetHash ())), REMOVAL_REASON_DUMMY);
299
299
}
300
300
301
301
BOOST_AUTO_TEST_CASE (MempoolAncestorIndexingTest)
0 commit comments