diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index a05ed86954..6e6fe0a7bf 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -512,7 +512,8 @@ static UniValue decoderawtransaction(const JSONRPCRequest& request) static std::string GetAllOutputTypes() { std::vector ret; - for (int i = TX_NONSTANDARD; i <= TX_WITNESS_UNKNOWN; ++i) { + using U = std::underlying_type::type; + for (U i = (U)TX_NONSTANDARD; i <= (U)TX_WITNESS_UNKNOWN; ++i) { ret.emplace_back(GetTxnOutputType(static_cast(i))); } return Join(ret, ", ");