Post
Topic
Board Announcements (Altcoins)
Re: [ANN] Neutron (NTRN) - New Optional Update V2.0.5 Wallet , EDU LIVE
by
audiotopix
on 10/09/2018, 23:56:56 UTC
Hi! When I try to call "createrawtransaction" via json-rpc, I'm getting the error "Invalid parameter, missing vout key".
In my opinion there's a bug in rpcrawtransaction.cpp on line 253:

https://github.com/neutroncoin/neutron/blob/a1640b0e9e7c34176762f7c8b9dbf5465bba4528/src/rpcrawtransaction.cpp#L253

The line checks if vout_v is null and negates it. So, if I pass valid vout indices to "createrawtransaction", they are valid so that "isNull()" returns false.
But because of the negation it returns with the error that my valid vout's are invalid. I think the line should look like:

Code:
if (!vout_v.isNum())

Anyone can confirm that this is a bug?

Seems a bug.
Submit a new issue https://github.com/neutroncoin/neutron/issues

You can test the code of other coins (DASH):
     
Code:
if (!vout_v.isNum())
            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");



Thank you, we will have a look and repair.