mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
rpc: Adjust ifdef to avoid unreachable code
This commit is contained in:
parent
7466a26cab
commit
61f82981b2
@ -1023,18 +1023,18 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
|
|||||||
new_request.params.push_back(request.params[1]);
|
new_request.params.push_back(request.params[1]);
|
||||||
new_request.params.push_back(request.params[3]);
|
new_request.params.push_back(request.params[3]);
|
||||||
return signrawtransactionwithkey(new_request);
|
return signrawtransactionwithkey(new_request);
|
||||||
}
|
} else {
|
||||||
// Otherwise sign with the wallet which does not take a privkeys parameter
|
|
||||||
#ifdef ENABLE_WALLET
|
#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[0]);
|
||||||
new_request.params.push_back(request.params[1]);
|
new_request.params.push_back(request.params[1]);
|
||||||
new_request.params.push_back(request.params[3]);
|
new_request.params.push_back(request.params[3]);
|
||||||
return signrawtransactionwithwallet(new_request);
|
return signrawtransactionwithwallet(new_request);
|
||||||
}
|
#else
|
||||||
#endif
|
|
||||||
// If we have made it this far, then wallet is disabled and no private keys were given, so fail here.
|
// 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.");
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "No private keys available.");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UniValue sendrawtransaction(const JSONRPCRequest& request)
|
UniValue sendrawtransaction(const JSONRPCRequest& request)
|
||||||
|
Loading…
Reference in New Issue
Block a user