@@ -1294,13 +1294,15 @@ bool MemPoolAccept::Finalize(const ATMPArgs& args, Workspace& ws)
1294
1294
// Remove conflicting transactions from the mempool
1295
1295
for (CTxMemPool::txiter it : m_subpackage.m_all_conflicts )
1296
1296
{
1297
- LogPrint (BCLog::MEMPOOL, " replacing tx %s (wtxid=%s) with %s (wtxid =%s) for %s additional fees, %d delta bytes \n " ,
1297
+ LogPrint (BCLog::MEMPOOL, " replacing mempool tx %s (wtxid=%s, fees=%s, vsize =%s). New tx %s (wtxid=%s, fees=%s, vsize=%s) \n " ,
1298
1298
it->GetTx ().GetHash ().ToString (),
1299
1299
it->GetTx ().GetWitnessHash ().ToString (),
1300
+ it->GetFee (),
1301
+ it->GetTxSize (),
1300
1302
hash.ToString (),
1301
1303
tx.GetWitnessHash ().ToString (),
1302
- FormatMoney (ws. m_modified_fees - m_subpackage. m_conflicting_fees ),
1303
- ( int ) entry->GetTxSize () - ( int )m_subpackage. m_conflicting_size );
1304
+ entry-> GetFee ( ),
1305
+ entry->GetTxSize ());
1304
1306
TRACE7 (mempool, replaced,
1305
1307
it->GetTx ().GetHash ().data (),
1306
1308
it->GetTxSize (),
@@ -1394,6 +1396,13 @@ bool MemPoolAccept::SubmitPackage(const ATMPArgs& args, std::vector<Workspace>&
1394
1396
std::transform (workspaces.cbegin (), workspaces.cend (), std::back_inserter (all_package_wtxids),
1395
1397
[](const auto & ws) { return ws.m_ptx ->GetWitnessHash (); });
1396
1398
1399
+ if (!m_subpackage.m_replaced_transactions .empty ()) {
1400
+ LogPrint (BCLog::MEMPOOL, " replaced %u mempool transactions with %u new one(s) for %s additional fees, %d delta bytes\n " ,
1401
+ m_subpackage.m_replaced_transactions .size (), workspaces.size (),
1402
+ m_subpackage.m_total_modified_fees - m_subpackage.m_conflicting_fees ,
1403
+ m_subpackage.m_total_vsize - static_cast <int >(m_subpackage.m_conflicting_size ));
1404
+ }
1405
+
1397
1406
// Add successful results. The returned results may change later if LimitMempoolSize() evicts them.
1398
1407
for (Workspace& ws : workspaces) {
1399
1408
const auto effective_feerate = args.m_package_feerates ? ws.m_package_feerate :
@@ -1475,6 +1484,13 @@ MempoolAcceptResult MemPoolAccept::AcceptSingleTransaction(const CTransactionRef
1475
1484
m_pool.m_opts .signals ->TransactionAddedToMempool (tx_info, m_pool.GetAndIncrementSequence ());
1476
1485
}
1477
1486
1487
+ if (!m_subpackage.m_replaced_transactions .empty ()) {
1488
+ LogPrint (BCLog::MEMPOOL, " replaced %u mempool transactions with 1 new transaction for %s additional fees, %d delta bytes\n " ,
1489
+ m_subpackage.m_replaced_transactions .size (),
1490
+ ws.m_modified_fees - m_subpackage.m_conflicting_fees ,
1491
+ ws.m_vsize - static_cast <int >(m_subpackage.m_conflicting_size ));
1492
+ }
1493
+
1478
1494
return MempoolAcceptResult::Success (std::move (m_subpackage.m_replaced_transactions ), ws.m_vsize , ws.m_base_fees ,
1479
1495
effective_feerate, single_wtxid);
1480
1496
}
0 commit comments