aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-08-08 11:41:26 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-08-08 11:41:29 +0200
commit4268426b45001f12c69695c31b76af111e5336db (patch)
treef4e303d1f1d88e79fcb7d4c3659c248ea50cb620
parent627c3c0e495b30af39a8cd8b3336770a6031097b (diff)
parent055d95f842e3659c41ad55101df8dce4865cd68f (diff)
downloadbitcoin-4268426b45001f12c69695c31b76af111e5336db.tar.xz
Merge #11002: [wallet] return correct error code from resendwallettransaction
055d95f [wallet] return correct error code from resendwallettransaction (John Newbery) Pull request description: New code in #10995 uses `RPC_INVALID_REQUEST`. According to the comment in rpc/protocol.h: ``` // RPC_INVALID_REQUEST is internally mapped to HTTP_BAD_REQUEST (400). // It should not be used for application-layer errors. ``` Change the returned error code to `RPC_WALLET_ERROR` #11000 will need to be updated to test for the correct error code. Tree-SHA512: 0201b3a2091adf17ad301825da5bd29f0ea7e284b5394cbef80483fc293a558acc849f74a0780bb8501acab324fc722e41ae049cffec7afb76884e26df4b809e
-rw-r--r--src/wallet/rpcwallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 27f84bfb7c..057379d8da 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2599,7 +2599,7 @@ UniValue resendwallettransactions(const JSONRPCRequest& request)
LOCK2(cs_main, pwallet->cs_wallet);
if (!pwallet->GetBroadcastTransactions()) {
- throw JSONRPCError(RPC_INVALID_REQUEST, "Error: Wallet transaction broadcasting is disabled with -walletbroadcast");
+ throw JSONRPCError(RPC_WALLET_ERROR, "Error: Wallet transaction broadcasting is disabled with -walletbroadcast");
}
std::vector<uint256> txids = pwallet->ResendWalletTransactionsBefore(GetTime(), g_connman.get());