diff options
| author | practicalswift <[email protected]> | 2018-03-26 15:19:44 +0200 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2018-03-26 15:19:44 +0200 |
| commit | 61f82981b2e12866520a5eceada4bf759754f827 (patch) | |
| tree | c3aeeab0930b48c2de2c078c59092ed6fa0af1ec /src/rpc/rawtransaction.cpp | |
| parent | Merge #12760: Docs: Improve documentation on standard communication channels (diff) | |
| download | discoin-61f82981b2e12866520a5eceada4bf759754f827.tar.xz discoin-61f82981b2e12866520a5eceada4bf759754f827.zip | |
rpc: Adjust ifdef to avoid unreachable code
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
| -rw-r--r-- | src/rpc/rawtransaction.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 20bfd3f35..77040f75f 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1023,18 +1023,18 @@ UniValue signrawtransaction(const JSONRPCRequest& request) new_request.params.push_back(request.params[1]); new_request.params.push_back(request.params[3]); return signrawtransactionwithkey(new_request); - } - // Otherwise sign with the wallet which does not take a privkeys parameter + } else { #ifdef ENABLE_WALLET - else { + // Otherwise sign with the wallet which does not take a privkeys parameter new_request.params.push_back(request.params[0]); new_request.params.push_back(request.params[1]); new_request.params.push_back(request.params[3]); return signrawtransactionwithwallet(new_request); - } +#else + // If we have made it this far, then wallet is disabled and no private keys were given, so fail here. + throw JSONRPCError(RPC_INVALID_PARAMETER, "No private keys available."); #endif - // If we have made it this far, then wallet is disabled and no private keys were given, so fail here. - throw JSONRPCError(RPC_INVALID_PARAMETER, "No private keys available."); + } } UniValue sendrawtransaction(const JSONRPCRequest& request) |