Skip to content

Commit

Permalink
Merge bitcoin#23050: log: change an incorrect fee to fee rate, and vi…
Browse files Browse the repository at this point in the history
…ce-versa

c17f554 Fix BlockAssembler::AddToBlock, CTxMemPool::PrioritiseTransaction logging (Jon Atack)

Pull request description:

  This is a tale of two fees, er, fee rates... indeed, one is misdescribed as a fee, and the other is incorrectly called a fee rate.

  From this review discussion: bitcoin#22689 (comment) (thanks to John Newbery).

ACKs for top commit:
  laanwj:
    Code review ACK c17f554

Tree-SHA512: 3d9df3209a72562c5f9bbf815923d5b089d04491b8d19caa2c04158c501b47ef01e47f1c32d89adcbaf3c6357329507f65b4bb2963214c3451bbfa61ac812530
  • Loading branch information
merge-script authored and vijaydasmp committed Nov 25, 2024
1 parent f9d044d commit 6606759
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/node/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ void BlockAssembler::AddToBlock(CTxMemPool::txiter iter)

bool fPrintPriority = gArgs.GetBoolArg("-printpriority", DEFAULT_PRINTPRIORITY);
if (fPrintPriority) {
LogPrintf("fee %s txid %s\n",
LogPrintf("fee rate %s txid %s\n",
CFeeRate(iter->GetModifiedFee(), iter->GetTxSize()).ToString(),
iter->GetTx().GetHash().ToString());
}
Expand Down
2 changes: 1 addition & 1 deletion src/txmempool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeD
++nTransactionsUpdated;
}
}
LogPrint(BCLog::MEMPOOL, "PrioritiseTransaction: %s feerate += %s\n", hash.ToString(), FormatMoney(nFeeDelta));
LogPrint(BCLog::MEMPOOL, "PrioritiseTransaction: %s fee += %s\n", hash.ToString(), FormatMoney(nFeeDelta));
}

void CTxMemPool::ApplyDelta(const uint256& hash, CAmount &nFeeDelta) const
Expand Down

0 comments on commit 6606759

Please sign in to comment.