Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add getnetworkinfo RPC #217

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

add getnetworkinfo RPC #217

wants to merge 3 commits into from

Conversation

ankh2054
Copy link

getnetworkinfo replaces getinfo on versions > 0.16.0 .

bitcoin/bitcoin#8780

getnetworkinfo seems to replace getinfo on later versions. Version > 0.18.0 no longer support getinfo()
Copy link
Author

@ankh2054 ankh2054 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added try and except to getinfo()m so it still runs getnetworkinfo() and prints warning.

bitcoin/rpc.py Outdated
r['paytxfee'] = int(r['paytxfee'] * COIN)
return r
except:
print("getnetworkinfo replaces getinfo on versions > 0.16.0, please use getnetworkinfo()")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should print to stderr or maybe call depreciationwarning or similar.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added DepreciationWarning seems to work well. Hope that works, otherwise let me know and I can add more. I'm very new to python so excuse my ignorance on some things.

@SachinMeier
Copy link

I am currently working on a full update of RPC calls based on v0.19.0.1, which should cover this as well. I am almost done with writing the code. How should I handle conflicts with this PR?

@petertodd
Copy link
Owner

petertodd commented Aug 12, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants