diff --git a/src/rpc/mempool.cpp b/src/rpc/mempool.cpp index 01c75bfda3e..90dc86cd015 100644 --- a/src/rpc/mempool.cpp +++ b/src/rpc/mempool.cpp @@ -616,7 +616,7 @@ static RPCHelpMan gettxspendingprevout() }, /*fAllowNull=*/false, /*fStrict=*/true); const uint256 txid(ParseHashO(o, "txid")); - const int nOutput = find_value(o, "vout").get_int(); + const int nOutput{find_value(o, "vout").getInt()}; if (nOutput < 0) { throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, vout cannot be negative"); }