diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 17ac4161bd..3d7e1b906a 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -2740,11 +2740,11 @@ UniValue rawissueasset(const JSONRPCRequest& request) throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction must have at least one output."); } if (!mtx.vout[mtx.vout.size() - 1].IsFee()) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction must have exactly one fee output, which must be last"); + throw JSONRPCError(RPC_INVALID_PARAMETER, "Last transaction output must be fee."); } for (size_t i = 0; i < mtx.vout.size() - 1; i++) { if (mtx.vout[i].IsFee()) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction must have exactly one fee output, which must be last"); + throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction can only have one fee output."); } } @@ -2868,11 +2868,11 @@ UniValue rawreissueasset(const JSONRPCRequest& request) // Validate fee output location, required by the implementation of reissueasset_base if (!mtx.vout[mtx.vout.size() - 1].IsFee()) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction must have exactly one fee output, which must be last"); + throw JSONRPCError(RPC_INVALID_PARAMETER, "Last transaction output must be fee."); } for (size_t i = 0; i < mtx.vout.size() - 1; i++) { if (mtx.vout[i].IsFee()) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction must have exactly one fee output, which must be last"); + throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction can only have one fee output."); } } diff --git a/test/functional/feature_issuance.py b/test/functional/feature_issuance.py index 349f2f225c..81c08266f8 100755 --- a/test/functional/feature_issuance.py +++ b/test/functional/feature_issuance.py @@ -297,7 +297,7 @@ class IssuanceTest(BitcoinTestFramework): assert_raises_rpc_error(-8, "Transaction must have at least one output.", self.nodes[0].rawissueasset, raw_tx, [{"asset_amount": 1, "asset_address": valid_addr}]) raw_tx = self.nodes[0].createrawtransaction([], {valid_addr: Decimal("1")}) - assert_raises_rpc_error(-8, "Transaction must have exactly one fee output, which must be last", + assert_raises_rpc_error(-8, "Last transaction output must be fee.", self.nodes[0].rawissueasset, raw_tx, [{"asset_amount": 1, "asset_address": valid_addr}]) # Make sure that invalid addresses are rejected.