getnetworkinfo() doesn`t work on MacOs curl
karpyshynroman opened this issue · comments
I start my node with this flags :
/Applications/BitcoinABC-Qt.app/Contents/MacOS/BitcoinABC-Qt -regtest -server -rpcuser=user -rpcpassword=password -rpcport=8332
this works:
curl --user user --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getrpcinfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/
Result:
Enter host password for user 'user':
{"result":{"active_commands":[{"method":"getrpcinfo","duration":24}],"logpath":"/Users/roma/Library/Application Support/Bitcoin/regtest/debug.log"},"error":null,"id":"curltext"}
But method getnetworkinfo()
doesnt work, it works only from UI, from curl - no:
curl --user user --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getnetworkinfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/
Result:
{"result":null,"error":{"code":-32603,"message":"Node context not found"},"id":"curltext"}
How to fix it?
This is a duplicate of #410.
I'm working on a fix, in the meantime you can use bitcoind
for your RPC calls since only bitcoin-qt
is affected by this bug.
Closing as it is a duplicate.
A fix has been committed to current master, and will be part of the next release.