From 6c2e899258059cbf8a22084f118b1aea9f0e34ce Mon Sep 17 00:00:00 2001 From: Andy Oknen Date: Mon, 6 Jan 2025 23:38:41 +0800 Subject: [PATCH] Improve transaction fee handling in BlockAssembler - Added logging for transactions that do not meet the minimum fee requirement, providing better visibility into fee-related decisions. - Enhanced the handling of modified transactions by erasing them from the modified transaction map and inserting them into a failed transaction set when the fee is insufficient. These changes aim to improve debugging and transaction management within the mining process. --- src/miner.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index f306104fd..af3e5d9fd 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -473,8 +473,15 @@ void BlockAssembler::addPackageTxs(int& nPackagesSelected, int& nDescendantsUpda if (packageFees < minFee) { - // Everything else we might consider has a lower fee rate - return; + LogPrintf("tx - %s, fee - %s, minFee - %s\n", iter->GetTx().GetHash().GetHex(), packageFees, minFee); + + if (fUsingModified) + { + mapModifiedTx.get().erase(modit); + failedTx.insert(iter); + } + + continue; } CTransactionRef tx = iter->GetSharedTx();