python-bitcoinlib
python-bitcoinlib copied to clipboard
In RPC module, "getinfo" method doesn't seem to work
Hi,
I noticed earlier today that the method getinfo()
doesn't seem to work in the rpc
module:
https://github.com/petertodd/python-bitcoinlib/blob/b5540e8a8a138f2a4872c34ce4223b8f4e6856d9/bitcoin/rpc.py#L513
Should call('getinfo')
be replaced by call('getblockchaininfo')
? (https://bitcoincore.org/en/doc/0.20.0/rpc/blockchain/getblockchaininfo/)
The getinfo
RPC call has been deprecated in favor of a bunch of more specific "info" calls including getblockchainfo
. See also getnetworkinfo
, getwalletinfo
etc. Whether this works depends on the version of bitcoind it's talking to. We should probably add direct methods to reflect changes in bitcoind's rpc...
including
getblockchainfo
typo: getblockchaininfo
https://bitcoincore.org/en/doc/0.16.0/rpc/blockchain/getblockchaininfo/