@@ -94,7 +94,7 @@ BOOST_FIXTURE_TEST_CASE(miniminer_negative, TestChain100Setup)
94
94
const CFeeRate feerate_zero (0 );
95
95
mini_miner_target0.BuildMockTemplate (feerate_zero);
96
96
// Check the quit condition:
97
- BOOST_CHECK (negative_modified_fees < feerate_zero.GetFee (pool.GetIter (tx_mod_negative->GetHash ()). value ( )->GetTxSize ()));
97
+ BOOST_CHECK (negative_modified_fees < feerate_zero.GetFee (Assert ( pool.GetEntry (tx_mod_negative->GetHash ()))->GetTxSize ()));
98
98
BOOST_CHECK (mini_miner_target0.GetMockTemplateTxids ().empty ());
99
99
100
100
// With no target feerate, the template includes all transactions, even negative feerate ones.
@@ -179,9 +179,9 @@ BOOST_FIXTURE_TEST_CASE(miniminer_1p1c, TestChain100Setup)
179
179
};
180
180
std::map<uint256, TxDimensions> tx_dims;
181
181
for (const auto & tx : all_transactions) {
182
- const auto it = pool.GetIter (tx->GetHash ()). value () ;
183
- tx_dims.emplace (tx->GetHash (), TxDimensions{it-> GetTxSize (), it-> GetModifiedFee (),
184
- CFeeRate (it-> GetModifiedFee (), it-> GetTxSize ())});
182
+ const auto & entry{* Assert ( pool.GetEntry (tx->GetHash ()))} ;
183
+ tx_dims.emplace (tx->GetHash (), TxDimensions{entry. GetTxSize (), entry. GetModifiedFee (),
184
+ CFeeRate (entry. GetModifiedFee (), entry. GetTxSize ())});
185
185
}
186
186
187
187
const std::vector<CFeeRate> various_normal_feerates ({CFeeRate (0 ), CFeeRate (500 ), CFeeRate (999 ),
@@ -447,15 +447,15 @@ BOOST_FIXTURE_TEST_CASE(miniminer_overlap, TestChain100Setup)
447
447
// tx3's feerate is lower than tx2's. same fee, different weight.
448
448
BOOST_CHECK (tx2_feerate > tx3_feerate);
449
449
const auto tx3_anc_feerate = CFeeRate (low_fee + med_fee + high_fee + high_fee, tx_vsizes[0 ] + tx_vsizes[1 ] + tx_vsizes[2 ] + tx_vsizes[3 ]);
450
- const auto tx3_iter = pool.GetIter (tx3->GetHash ());
451
- BOOST_CHECK (tx3_anc_feerate == CFeeRate (tx3_iter. value ()-> GetModFeesWithAncestors (), tx3_iter. value ()-> GetSizeWithAncestors ()));
450
+ const auto & tx3_entry{* Assert ( pool.GetEntry (tx3->GetHash ()))} ;
451
+ BOOST_CHECK (tx3_anc_feerate == CFeeRate (tx3_entry. GetModFeesWithAncestors (), tx3_entry. GetSizeWithAncestors ()));
452
452
const auto tx4_feerate = CFeeRate (high_fee, tx_vsizes[4 ]);
453
453
const auto tx6_anc_feerate = CFeeRate (high_fee + low_fee + med_fee, tx_vsizes[4 ] + tx_vsizes[5 ] + tx_vsizes[6 ]);
454
- const auto tx6_iter = pool.GetIter (tx6->GetHash ());
455
- BOOST_CHECK (tx6_anc_feerate == CFeeRate (tx6_iter. value ()-> GetModFeesWithAncestors (), tx6_iter. value ()-> GetSizeWithAncestors ()));
454
+ const auto & tx6_entry{* Assert ( pool.GetEntry (tx6->GetHash ()))} ;
455
+ BOOST_CHECK (tx6_anc_feerate == CFeeRate (tx6_entry. GetModFeesWithAncestors (), tx6_entry. GetSizeWithAncestors ()));
456
456
const auto tx7_anc_feerate = CFeeRate (high_fee + low_fee + high_fee, tx_vsizes[4 ] + tx_vsizes[5 ] + tx_vsizes[7 ]);
457
- const auto tx7_iter = pool.GetIter (tx7->GetHash ());
458
- BOOST_CHECK (tx7_anc_feerate == CFeeRate (tx7_iter. value ()-> GetModFeesWithAncestors (), tx7_iter. value ()-> GetSizeWithAncestors ()));
457
+ const auto & tx7_entry{* Assert ( pool.GetEntry (tx7->GetHash ()))} ;
458
+ BOOST_CHECK (tx7_anc_feerate == CFeeRate (tx7_entry. GetModFeesWithAncestors (), tx7_entry. GetSizeWithAncestors ()));
459
459
BOOST_CHECK (tx4_feerate > tx6_anc_feerate);
460
460
BOOST_CHECK (tx4_feerate > tx7_anc_feerate);
461
461
0 commit comments