Skip to content

Commit 6af49dd

Browse files
committed
Output a bit more information for fee calculation report.
1 parent a54c7b9 commit 6af49dd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/wallet/wallet.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,6 +2679,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
26792679
assert(txNew.nLockTime <= (unsigned int)chainActive.Height());
26802680
assert(txNew.nLockTime < LOCKTIME_THRESHOLD);
26812681
FeeCalculation feeCalc;
2682+
CAmount nFeeNeeded;
26822683
unsigned int nBytes;
26832684
{
26842685
std::set<CInputCoin> setCoins;
@@ -2840,7 +2841,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
28402841
vin.scriptWitness.SetNull();
28412842
}
28422843

2843-
CAmount nFeeNeeded = GetMinimumFee(nBytes, coin_control, ::mempool, ::feeEstimator, &feeCalc);
2844+
nFeeNeeded = GetMinimumFee(nBytes, coin_control, ::mempool, ::feeEstimator, &feeCalc);
28442845

28452846
// If we made it here and we aren't even able to meet the relay fee on the next pass, give up
28462847
// because we must be at the maximum allowed fee.
@@ -2964,8 +2965,8 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
29642965
}
29652966
}
29662967

2967-
LogPrintf("Fee Calculation: Fee:%d Bytes:%u Tgt:%d (requested %d) Reason:\"%s\" Decay %.5f: Estimation: (%g - %g) %.2f%% %.1f/(%.1f %d mem %.1f out) Fail: (%g - %g) %.2f%% %.1f/(%.1f %d mem %.1f out)\n",
2968-
nFeeRet, nBytes, feeCalc.returnedTarget, feeCalc.desiredTarget, StringForFeeReason(feeCalc.reason), feeCalc.est.decay,
2968+
LogPrintf("Fee Calculation: Fee:%d Bytes:%u Needed:%d Tgt:%d (requested %d) Reason:\"%s\" Decay %.5f: Estimation: (%g - %g) %.2f%% %.1f/(%.1f %d mem %.1f out) Fail: (%g - %g) %.2f%% %.1f/(%.1f %d mem %.1f out)\n",
2969+
nFeeRet, nBytes, nFeeNeeded, feeCalc.returnedTarget, feeCalc.desiredTarget, StringForFeeReason(feeCalc.reason), feeCalc.est.decay,
29692970
feeCalc.est.pass.start, feeCalc.est.pass.end,
29702971
100 * feeCalc.est.pass.withinTarget / (feeCalc.est.pass.totalConfirmed + feeCalc.est.pass.inMempool + feeCalc.est.pass.leftMempool),
29712972
feeCalc.est.pass.withinTarget, feeCalc.est.pass.totalConfirmed, feeCalc.est.pass.inMempool, feeCalc.est.pass.leftMempool,

0 commit comments

Comments
 (0)