python-bitcoinlib icon indicating copy to clipboard operation
python-bitcoinlib copied to clipboard

In RPC module, "getinfo" method doesn't seem to work

Open jeanmonet opened this issue 4 years ago • 2 comments

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/)

jeanmonet avatar Sep 20 '20 20:09 jeanmonet

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...

mcelrath avatar Sep 23 '20 16:09 mcelrath

including getblockchainfo

typo: getblockchaininfo

https://bitcoincore.org/en/doc/0.16.0/rpc/blockchain/getblockchaininfo/

MentalNomad avatar Sep 24 '20 01:09 MentalNomad