json rpc – RPCConvertValues() call error

I’d like to call RPC programmatically, instead of using bitcoin-cli. when I call the function RPCConvertValues(), it always raise error RPCConvertValues() is defined here : https://github.com/bitcoin/bitcoin/blob/cab94cc07489f704c4b95171b23be0e8025df794/src/rpc/client.cpp#L221 test code are here : https://github.com/bitcoin/bitcoin/blob/46fc4d1a24c88e797d6080336e3828e45e39c3fd/src/test/rpc_tests.cpp#L319https://github.com/bitcoin/bitcoin/blob/7967104aee055476107dc17265cefc4ae4e75378/src/bitcoin-cli.cpp#L293https://github.com/bitcoin/bitcoin/blob/eb292af309aa57f3d7998b01307dd4cb91702908/src/qt/rpcconsole.cpp#L302 My test code : #include <iostream>#include <rpc/blockchain.cpp>#include <rpc/request.h>#include <rpc/client.h>#include <rpc/util.h>#include <univalue/include/univalue.h>#include <interfaces/node.h>namespace experimental { void wait(int seconds) { boost::this_thread::sleep(boost::posix_time::seconds(seconds)); } void rpcgetblockhash() { …

json rpc – RPCConvertValues() call error Read More »