diff options
author | Nima Yazdanmehr <yazdanmehr@protonmail.com> | 2020-09-30 20:43:05 +0330 |
---|---|---|
committer | Nima Yazdanmehr <yazdanmehr@protonmail.com> | 2020-09-30 20:43:05 +0330 |
commit | f471a3be00c2b6433b8c258b716982c0539da13f (patch) | |
tree | ad276091904da4b653ee3a76dcbafd9e58795405 /src/rpc | |
parent | 1b313cacc99a1b372238f9036abed5491f9d28f7 (diff) |
scripted diff: Improve invalid vout value rpc error message
-BEGIN VERIFY SCRIPT-
r() { sed -i 's/vout must be positive/vout cannot be negative/g' $1 }
r $(git grep -l 'vout must be positive')
-END VERIFY SCRIPT-
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/rawtransaction_util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/rawtransaction_util.cpp b/src/rpc/rawtransaction_util.cpp index cfe4575090..66fd6dff88 100644 --- a/src/rpc/rawtransaction_util.cpp +++ b/src/rpc/rawtransaction_util.cpp @@ -53,7 +53,7 @@ CMutableTransaction ConstructTransaction(const UniValue& inputs_in, const UniVal throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, missing vout key"); int nOutput = vout_v.get_int(); if (nOutput < 0) - throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, vout must be positive"); + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, vout cannot be negative"); uint32_t nSequence; if (rbf) { @@ -175,7 +175,7 @@ void ParsePrevouts(const UniValue& prevTxsUnival, FillableSigningProvider* keyst int nOut = find_value(prevOut, "vout").get_int(); if (nOut < 0) { - throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "vout must be positive"); + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "vout cannot be negative"); } COutPoint out(txid, nOut); |