Skip to content

Commit 0c57557

Browse files
committed
wallet: create tx, log resulting coin selection info
Useful for understanding what is going on internally when the software is running. Debug issues, and provide more accurate feedback to users.
1 parent 5cea25b commit 0c57557

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wallet/spend.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
12631263
// accidental reuse.
12641264
reservedest.KeepDestination();
12651265

1266+
wallet.WalletLogPrintf("Coin Selection: Algorithm:%s, Waste Metric Score:%d\n", GetAlgorithmName(result.GetAlgo()), result.GetWaste());
12661267
wallet.WalletLogPrintf("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",
12671268
current_fee, nBytes, feeCalc.returnedTarget, feeCalc.desiredTarget, StringForFeeReason(feeCalc.reason), feeCalc.est.decay,
12681269
feeCalc.est.pass.start, feeCalc.est.pass.end,

0 commit comments

Comments
 (0)