Skip to content

Commit

Permalink
Fix revoke reason check for ProUpRevTx (#2787)
Browse files Browse the repository at this point in the history
  • Loading branch information
gladcow authored and UdjinM6 committed Mar 21, 2019
1 parent 658ce9e commit 7135f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/rpcevo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ UniValue protx_revoke(const JSONRPCRequest& request)

if (request.params.size() > 3) {
int32_t nReason = ParseInt32V(request.params[3], "reason");
if (nReason < 0 || nReason >= CProUpRevTx::REASON_LAST) {
if (nReason < 0 || nReason > CProUpRevTx::REASON_LAST) {
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("invalid reason %d, must be between 0 and %d", nReason, CProUpRevTx::REASON_LAST));
}
ptx.nReason = (uint16_t)nReason;
Expand Down

0 comments on commit 7135f01

Please sign in to comment.