Skip to content

Commit 6f01dcf

Browse files
author
MarcoFalke
committed
Merge #11597: [trivial] Fix error messages in CFeeBumper
a02c5e4 [trivial] Fix error messages in CFeeBumper (Karl-Johan Alm) Pull request description: …pool fee rate. Tree-SHA512: c179853b2a19fdb767e46b29068f3e1ce6db75fda4356746472c93c5b51f0aa495a988c4da1e14762993d57229e525594a2e9d0e089f931c1c67fec7807bda54
2 parents ef8a634 + a02c5e4 commit 6f01dcf

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/wallet/feebumper.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,13 @@ CFeeBumper::CFeeBumper(const CWallet *pWallet, const uint256 txidIn, const CCoin
196196
// moment earlier. In this case, we report an error to the user, who may use totalFee to make an adjustment.
197197
CFeeRate minMempoolFeeRate = mempool.GetMinFee(gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000);
198198
if (nNewFeeRate.GetFeePerK() < minMempoolFeeRate.GetFeePerK()) {
199-
vErrors.push_back(strprintf("New fee rate (%s) is less than the minimum fee rate (%s) to get into the mempool. totalFee value should to be at least %s or settxfee value should be at least %s to add transaction.", FormatMoney(nNewFeeRate.GetFeePerK()), FormatMoney(minMempoolFeeRate.GetFeePerK()), FormatMoney(minMempoolFeeRate.GetFee(maxNewTxSize)), FormatMoney(minMempoolFeeRate.GetFeePerK())));
199+
vErrors.push_back(strprintf(
200+
"New fee rate (%s) is lower than the minimum fee rate (%s) to get into the mempool -- "
201+
"the totalFee value should be at least %s or the settxfee value should be at least %s to add transaction",
202+
FormatMoney(nNewFeeRate.GetFeePerK()),
203+
FormatMoney(minMempoolFeeRate.GetFeePerK()),
204+
FormatMoney(minMempoolFeeRate.GetFee(maxNewTxSize)),
205+
FormatMoney(minMempoolFeeRate.GetFeePerK())));
200206
currentResult = BumpFeeResult::WALLET_ERROR;
201207
return;
202208
}
@@ -267,15 +273,15 @@ bool CFeeBumper::commit(CWallet *pWallet)
267273
CValidationState state;
268274
if (!pWallet->CommitTransaction(wtxBumped, reservekey, g_connman.get(), state)) {
269275
// NOTE: CommitTransaction never returns false, so this should never happen.
270-
vErrors.push_back(strprintf("Error: The transaction was rejected! Reason given: %s", state.GetRejectReason()));
276+
vErrors.push_back(strprintf("The transaction was rejected: %s", state.GetRejectReason()));
271277
return false;
272278
}
273279

274280
bumpedTxid = wtxBumped.GetHash();
275281
if (state.IsInvalid()) {
276282
// This can happen if the mempool rejected the transaction. Report
277283
// what happened in the "errors" response.
278-
vErrors.push_back(strprintf("Error: The transaction was rejected: %s", FormatStateMessage(state)));
284+
vErrors.push_back(strprintf("The transaction was rejected: %s", FormatStateMessage(state)));
279285
}
280286

281287
// mark the original tx as bumped
@@ -284,7 +290,7 @@ bool CFeeBumper::commit(CWallet *pWallet)
284290
// along with an exception. It would be good to return information about
285291
// wtxBumped to the caller even if marking the original transaction
286292
// replaced does not succeed for some reason.
287-
vErrors.push_back("Error: Created new bumpfee transaction but could not mark the original transaction as replaced.");
293+
vErrors.push_back("Created new bumpfee transaction but could not mark the original transaction as replaced");
288294
}
289295
return true;
290296
}

0 commit comments

Comments
 (0)