Skip to content

Commit

Permalink
Merge #12787: rpc: Adjust ifdef to avoid unreachable code
Browse files Browse the repository at this point in the history
61f8298 rpc: Adjust ifdef to avoid unreachable code (practicalswift)

Pull request description:

  Adjust `ifdef` to avoid unreachable code.

  Introduced in 1e79c05.

Tree-SHA512: c775cc9181e4034f26c5b219974e06886435275933249b169d2bc8bc98f639c4027e1e7d991f43bded62146a141acee6d3be1f2b313042d9bbc0a5d2e71d6c7c
  • Loading branch information
laanwj committed Mar 29, 2018
2 parents 047865e + 61f8298 commit cd99e5b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cd99e5b

Please sign in to comment.