aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-02-14 10:01:06 -0500
committerMarcoFalke <falke.marco@gmail.com>2019-02-14 10:32:02 -0500
commitfa9b60c842741dc92a33925fca5796ebaa4510bd (patch)
treea918c59fb07a53c5af68f72430f751b2cb642da9 /src/rpc
parent38989ab03fb74ad56c1018c37cb24d17cbb3a16f (diff)
Remove unused TransactionError constants
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/rawtransaction.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 7fe73e56da..44cac14228 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -1050,10 +1050,11 @@ static UniValue sendrawtransaction(const JSONRPCRequest& request)
bool allowhighfees = false;
if (!request.params[1].isNull()) allowhighfees = request.params[1].get_bool();
+ const CAmount highfee{allowhighfees ? 0 : ::maxTxFee};
uint256 txid;
- TransactionError err;
std::string err_string;
- if (!BroadcastTransaction(tx, txid, err, err_string, allowhighfees)) {
+ const TransactionError err = BroadcastTransaction(tx, txid, err_string, highfee);
+ if (TransactionError::OK != err) {
throw JSONRPCTransactionError(err, err_string);
}
@@ -1478,8 +1479,8 @@ UniValue combinepsbt(const JSONRPCRequest& request)
}
PartiallySignedTransaction merged_psbt;
- TransactionError error;
- if (!CombinePSBTs(merged_psbt, error, psbtxs)) {
+ const TransactionError error = CombinePSBTs(merged_psbt, psbtxs);
+ if (error != TransactionError::OK) {
throw JSONRPCTransactionError(error);
}