@@ -188,7 +188,7 @@ void BlockAssembler::onlyUnconfirmed(CTxMemPool::setEntries& testSet)
188
188
{
189
189
for (CTxMemPool::setEntries::iterator iit = testSet.begin (); iit != testSet.end (); ) {
190
190
// Only test txs not already in the block
191
- if (inBlock.count (*iit)) {
191
+ if (inBlock.count (( *iit)-> GetSharedTx ()-> GetHash () )) {
192
192
testSet.erase (iit++);
193
193
} else {
194
194
iit++;
@@ -229,7 +229,7 @@ void BlockAssembler::AddToBlock(CTxMemPool::txiter iter)
229
229
++nBlockTx;
230
230
nBlockSigOpsCost += iter->GetSigOpCost ();
231
231
nFees += iter->GetFee ();
232
- inBlock.insert (iter);
232
+ inBlock.insert (iter-> GetSharedTx ()-> GetHash () );
233
233
234
234
bool fPrintPriority = gArgs .GetBoolArg (" -printpriority" , DEFAULT_PRINTPRIORITY);
235
235
if (fPrintPriority ) {
@@ -298,7 +298,7 @@ void BlockAssembler::addPackageTxs(const CTxMemPool& mempool, int& nPackagesSele
298
298
// because some of their txs are already in the block
299
299
indexed_modified_transaction_set mapModifiedTx;
300
300
// Keep track of entries that failed inclusion, to avoid duplicate work
301
- CTxMemPool::setEntries failedTx;
301
+ std::set<Txid> failedTx;
302
302
303
303
CTxMemPool::indexed_transaction_set::index<ancestor_score>::type::iterator mi = mempool.mapTx .get <ancestor_score>().begin ();
304
304
CTxMemPool::txiter iter;
@@ -326,7 +326,7 @@ void BlockAssembler::addPackageTxs(const CTxMemPool& mempool, int& nPackagesSele
326
326
if (mi != mempool.mapTx .get <ancestor_score>().end ()) {
327
327
auto it = mempool.mapTx .project <0 >(mi);
328
328
assert (it != mempool.mapTx .end ());
329
- if (mapModifiedTx.count (it) || inBlock.count (it) || failedTx.count (it)) {
329
+ if (mapModifiedTx.count (it) || inBlock.count (it-> GetSharedTx ()-> GetHash ()) || failedTx.count (it-> GetSharedTx ()-> GetHash () )) {
330
330
++mi;
331
331
continue ;
332
332
}
@@ -360,7 +360,7 @@ void BlockAssembler::addPackageTxs(const CTxMemPool& mempool, int& nPackagesSele
360
360
361
361
// We skip mapTx entries that are inBlock, and mapModifiedTx shouldn't
362
362
// contain anything that is inBlock.
363
- assert (!inBlock.count (iter));
363
+ assert (!inBlock.count (iter-> GetSharedTx ()-> GetHash () ));
364
364
365
365
uint64_t packageSize = iter->GetSizeWithAncestors ();
366
366
CAmount packageFees = iter->GetModFeesWithAncestors ();
@@ -382,7 +382,7 @@ void BlockAssembler::addPackageTxs(const CTxMemPool& mempool, int& nPackagesSele
382
382
// we must erase failed entries so that we can consider the
383
383
// next best entry on the next loop iteration
384
384
mapModifiedTx.get <ancestor_score>().erase (modit);
385
- failedTx.insert (iter);
385
+ failedTx.insert (iter-> GetSharedTx ()-> GetHash () );
386
386
}
387
387
388
388
++nConsecutiveFailed;
@@ -404,7 +404,7 @@ void BlockAssembler::addPackageTxs(const CTxMemPool& mempool, int& nPackagesSele
404
404
if (!TestPackageTransactions (ancestors)) {
405
405
if (fUsingModified ) {
406
406
mapModifiedTx.get <ancestor_score>().erase (modit);
407
- failedTx.insert (iter);
407
+ failedTx.insert (iter-> GetSharedTx ()-> GetHash () );
408
408
}
409
409
continue ;
410
410
}
0 commit comments