Skip to content

Commit

Permalink
Improve transaction fee handling in BlockAssembler
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
andyoknen committed Jan 6, 2025
1 parent 76b20a0 commit 6c2e899
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ancestor_score>().erase(modit);
failedTx.insert(iter);
}

continue;
}

CTransactionRef tx = iter->GetSharedTx();
Expand Down

0 comments on commit 6c2e899

Please sign in to comment.