Post
Topic
Board Development & Technical Discussion
Re: New RPC- Paramaters are not parsed correctly
by
NotATether
on 31/05/2021, 09:47:19 UTC
So I inspected the source code and found this enumeration of types that corresponds to RPCArg types: https://github.com/bitcoin/bitcoin/blob/7fcf53f7b4524572d1d0c9a5fdc388e87eb02416/src/rpc/util.h#L119-L130

And "3" stands for "NUM", as they start counting from zero. That explains why your string parameters are not being parsed properly.

So to be clear, you said:

When I'm printing the parsed values at the beginning this the output I'm receiving:
Code:
param value: 1 param type: 3
param value: abc param type: 3
param value: abc param type: 3


Are you printing these values after the code block you posted? It seems so, because I don't see how get_int64() and get_str() would generate this exception. In that case, on which line does the debugger catches the error?