@@ -126,36 +126,35 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
126126 tx1.vout .resize (1 );
127127 tx1.vout [0 ].scriptPubKey = CScript () << OP_11 << OP_EQUAL;
128128 tx1.vout [0 ].nValue = 10 * COIN;
129- pool.addUnchecked (tx1.GetHash (), entry.Fee (10000LL ).Priority ( 10.0 ). FromTx (tx1));
129+ pool.addUnchecked (tx1.GetHash (), entry.Fee (10000LL ).FromTx (tx1));
130130
131131 /* highest fee */
132132 CMutableTransaction tx2 = CMutableTransaction ();
133133 tx2.vout .resize (1 );
134134 tx2.vout [0 ].scriptPubKey = CScript () << OP_11 << OP_EQUAL;
135135 tx2.vout [0 ].nValue = 2 * COIN;
136- pool.addUnchecked (tx2.GetHash (), entry.Fee (20000LL ).Priority ( 9.0 ). FromTx (tx2));
136+ pool.addUnchecked (tx2.GetHash (), entry.Fee (20000LL ).FromTx (tx2));
137137
138138 /* lowest fee */
139139 CMutableTransaction tx3 = CMutableTransaction ();
140140 tx3.vout .resize (1 );
141141 tx3.vout [0 ].scriptPubKey = CScript () << OP_11 << OP_EQUAL;
142142 tx3.vout [0 ].nValue = 5 * COIN;
143- pool.addUnchecked (tx3.GetHash (), entry.Fee (0LL ).Priority ( 100.0 ). FromTx (tx3));
143+ pool.addUnchecked (tx3.GetHash (), entry.Fee (0LL ).FromTx (tx3));
144144
145145 /* 2nd highest fee */
146146 CMutableTransaction tx4 = CMutableTransaction ();
147147 tx4.vout .resize (1 );
148148 tx4.vout [0 ].scriptPubKey = CScript () << OP_11 << OP_EQUAL;
149149 tx4.vout [0 ].nValue = 6 * COIN;
150- pool.addUnchecked (tx4.GetHash (), entry.Fee (15000LL ).Priority ( 1.0 ). FromTx (tx4));
150+ pool.addUnchecked (tx4.GetHash (), entry.Fee (15000LL ).FromTx (tx4));
151151
152152 /* equal fee rate to tx1, but newer */
153153 CMutableTransaction tx5 = CMutableTransaction ();
154154 tx5.vout .resize (1 );
155155 tx5.vout [0 ].scriptPubKey = CScript () << OP_11 << OP_EQUAL;
156156 tx5.vout [0 ].nValue = 11 * COIN;
157157 entry.nTime = 1 ;
158- entry.dPriority = 10.0 ;
159158 pool.addUnchecked (tx5.GetHash (), entry.Fee (10000LL ).FromTx (tx5));
160159 BOOST_CHECK_EQUAL (pool.size (), 5 );
161160
@@ -328,29 +327,29 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
328327 tx1.vout .resize (1 );
329328 tx1.vout [0 ].scriptPubKey = CScript () << OP_11 << OP_EQUAL;
330329 tx1.vout [0 ].nValue = 10 * COIN;
331- pool.addUnchecked (tx1.GetHash (), entry.Fee (10000LL ).Priority ( 10.0 ). FromTx (tx1));
330+ pool.addUnchecked (tx1.GetHash (), entry.Fee (10000LL ).FromTx (tx1));
332331
333332 /* highest fee */
334333 CMutableTransaction tx2 = CMutableTransaction ();
335334 tx2.vout .resize (1 );
336335 tx2.vout [0 ].scriptPubKey = CScript () << OP_11 << OP_EQUAL;
337336 tx2.vout [0 ].nValue = 2 * COIN;
338- pool.addUnchecked (tx2.GetHash (), entry.Fee (20000LL ).Priority ( 9.0 ). FromTx (tx2));
337+ pool.addUnchecked (tx2.GetHash (), entry.Fee (20000LL ).FromTx (tx2));
339338 uint64_t tx2Size = GetVirtualTransactionSize (tx2);
340339
341340 /* lowest fee */
342341 CMutableTransaction tx3 = CMutableTransaction ();
343342 tx3.vout .resize (1 );
344343 tx3.vout [0 ].scriptPubKey = CScript () << OP_11 << OP_EQUAL;
345344 tx3.vout [0 ].nValue = 5 * COIN;
346- pool.addUnchecked (tx3.GetHash (), entry.Fee (0LL ).Priority ( 100.0 ). FromTx (tx3));
345+ pool.addUnchecked (tx3.GetHash (), entry.Fee (0LL ).FromTx (tx3));
347346
348347 /* 2nd highest fee */
349348 CMutableTransaction tx4 = CMutableTransaction ();
350349 tx4.vout .resize (1 );
351350 tx4.vout [0 ].scriptPubKey = CScript () << OP_11 << OP_EQUAL;
352351 tx4.vout [0 ].nValue = 6 * COIN;
353- pool.addUnchecked (tx4.GetHash (), entry.Fee (15000LL ).Priority ( 1.0 ). FromTx (tx4));
352+ pool.addUnchecked (tx4.GetHash (), entry.Fee (15000LL ).FromTx (tx4));
354353
355354 /* equal fee rate to tx1, but newer */
356355 CMutableTransaction tx5 = CMutableTransaction ();
@@ -434,23 +433,22 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
434433{
435434 CTxMemPool pool (CFeeRate (1000 ));
436435 TestMemPoolEntryHelper entry;
437- entry.dPriority = 10.0 ;
438436
439437 CMutableTransaction tx1 = CMutableTransaction ();
440438 tx1.vin .resize (1 );
441439 tx1.vin [0 ].scriptSig = CScript () << OP_1;
442440 tx1.vout .resize (1 );
443441 tx1.vout [0 ].scriptPubKey = CScript () << OP_1 << OP_EQUAL;
444442 tx1.vout [0 ].nValue = 10 * COIN;
445- pool.addUnchecked (tx1.GetHash (), entry.Fee (10000LL ).FromTx (tx1, &pool ));
443+ pool.addUnchecked (tx1.GetHash (), entry.Fee (10000LL ).FromTx (tx1));
446444
447445 CMutableTransaction tx2 = CMutableTransaction ();
448446 tx2.vin .resize (1 );
449447 tx2.vin [0 ].scriptSig = CScript () << OP_2;
450448 tx2.vout .resize (1 );
451449 tx2.vout [0 ].scriptPubKey = CScript () << OP_2 << OP_EQUAL;
452450 tx2.vout [0 ].nValue = 10 * COIN;
453- pool.addUnchecked (tx2.GetHash (), entry.Fee (5000LL ).FromTx (tx2, &pool ));
451+ pool.addUnchecked (tx2.GetHash (), entry.Fee (5000LL ).FromTx (tx2));
454452
455453 pool.TrimToSize (pool.DynamicMemoryUsage ()); // should do nothing
456454 BOOST_CHECK (pool.exists (tx1.GetHash ()));
@@ -460,15 +458,15 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
460458 BOOST_CHECK (pool.exists (tx1.GetHash ()));
461459 BOOST_CHECK (!pool.exists (tx2.GetHash ()));
462460
463- pool.addUnchecked (tx2.GetHash (), entry.FromTx (tx2, &pool ));
461+ pool.addUnchecked (tx2.GetHash (), entry.FromTx (tx2));
464462 CMutableTransaction tx3 = CMutableTransaction ();
465463 tx3.vin .resize (1 );
466464 tx3.vin [0 ].prevout = COutPoint (tx2.GetHash (), 0 );
467465 tx3.vin [0 ].scriptSig = CScript () << OP_2;
468466 tx3.vout .resize (1 );
469467 tx3.vout [0 ].scriptPubKey = CScript () << OP_3 << OP_EQUAL;
470468 tx3.vout [0 ].nValue = 10 * COIN;
471- pool.addUnchecked (tx3.GetHash (), entry.Fee (20000LL ).FromTx (tx3, &pool ));
469+ pool.addUnchecked (tx3.GetHash (), entry.Fee (20000LL ).FromTx (tx3));
472470
473471 pool.TrimToSize (pool.DynamicMemoryUsage () * 3 / 4 ); // tx3 should pay for tx2 (CPFP)
474472 BOOST_CHECK (!pool.exists (tx1.GetHash ()));
@@ -531,10 +529,10 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
531529 tx7.vout [1 ].scriptPubKey = CScript () << OP_7 << OP_EQUAL;
532530 tx7.vout [1 ].nValue = 10 * COIN;
533531
534- pool.addUnchecked (tx4.GetHash (), entry.Fee (7000LL ).FromTx (tx4, &pool ));
535- pool.addUnchecked (tx5.GetHash (), entry.Fee (1000LL ).FromTx (tx5, &pool ));
536- pool.addUnchecked (tx6.GetHash (), entry.Fee (1100LL ).FromTx (tx6, &pool ));
537- pool.addUnchecked (tx7.GetHash (), entry.Fee (9000LL ).FromTx (tx7, &pool ));
532+ pool.addUnchecked (tx4.GetHash (), entry.Fee (7000LL ).FromTx (tx4));
533+ pool.addUnchecked (tx5.GetHash (), entry.Fee (1000LL ).FromTx (tx5));
534+ pool.addUnchecked (tx6.GetHash (), entry.Fee (1100LL ).FromTx (tx6));
535+ pool.addUnchecked (tx7.GetHash (), entry.Fee (9000LL ).FromTx (tx7));
538536
539537 // we only require this remove, at max, 2 txn, because its not clear what we're really optimizing for aside from that
540538 pool.TrimToSize (pool.DynamicMemoryUsage () - 1 );
@@ -543,17 +541,17 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
543541 BOOST_CHECK (!pool.exists (tx7.GetHash ()));
544542
545543 if (!pool.exists (tx5.GetHash ()))
546- pool.addUnchecked (tx5.GetHash (), entry.Fee (1000LL ).FromTx (tx5, &pool ));
547- pool.addUnchecked (tx7.GetHash (), entry.Fee (9000LL ).FromTx (tx7, &pool ));
544+ pool.addUnchecked (tx5.GetHash (), entry.Fee (1000LL ).FromTx (tx5));
545+ pool.addUnchecked (tx7.GetHash (), entry.Fee (9000LL ).FromTx (tx7));
548546
549547 pool.TrimToSize (pool.DynamicMemoryUsage () / 2 ); // should maximize mempool size by only removing 5/7
550548 BOOST_CHECK (pool.exists (tx4.GetHash ()));
551549 BOOST_CHECK (!pool.exists (tx5.GetHash ()));
552550 BOOST_CHECK (pool.exists (tx6.GetHash ()));
553551 BOOST_CHECK (!pool.exists (tx7.GetHash ()));
554552
555- pool.addUnchecked (tx5.GetHash (), entry.Fee (1000LL ).FromTx (tx5, &pool ));
556- pool.addUnchecked (tx7.GetHash (), entry.Fee (9000LL ).FromTx (tx7, &pool ));
553+ pool.addUnchecked (tx5.GetHash (), entry.Fee (1000LL ).FromTx (tx5));
554+ pool.addUnchecked (tx7.GetHash (), entry.Fee (9000LL ).FromTx (tx7));
557555
558556 std::vector<CTransactionRef> vtx;
559557 SetMockTime (42 );
0 commit comments