mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Consistently use FormatStateMessage in RPC error output
This will include the error code and debug output as well as the reason string. See #11955 for the motivation.
This commit is contained in:
@@ -267,7 +267,7 @@ Result CommitTransaction(CWallet* wallet, const uint256& txid, CMutableTransacti
|
||||
CValidationState state;
|
||||
if (!wallet->CommitTransaction(wtxBumped, reservekey, g_connman.get(), state)) {
|
||||
// NOTE: CommitTransaction never returns false, so this should never happen.
|
||||
errors.push_back(strprintf("The transaction was rejected: %s", state.GetRejectReason()));
|
||||
errors.push_back(strprintf("The transaction was rejected: %s", FormatStateMessage(state)));
|
||||
return Result::WALLET_ERROR;
|
||||
}
|
||||
|
||||
@@ -290,4 +290,3 @@ Result CommitTransaction(CWallet* wallet, const uint256& txid, CMutableTransacti
|
||||
}
|
||||
|
||||
} // namespace feebumper
|
||||
|
||||
|
||||
Reference in New Issue
Block a user