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

cli: degrade -getinfo gracefully for older servers #19874

Conversation

jonatack
Copy link
Member

@jonatack jonatack commented Sep 4, 2020

Follow-up to #19405. Degrade gracefully when -getinfo is called on an older version of bitcoind where getnetworkinfo does not return in/out connections.

before

  "connections": {
    "in": null,
    "out": null,
    "total": 125
  }

after

  "connections": {
    "total": 125
  }

@luke-jr
Copy link
Member

luke-jr commented Sep 4, 2020

This opens a can of worms IMO, and isn't worth it just to hide null values (which should be considered equivalent to omitted ones anyway)

@jonatack
Copy link
Member Author

jonatack commented Sep 4, 2020

@luke-jr that could be. I felt I'd be remiss to not at least propose a patch.

@laanwj
Copy link
Member

laanwj commented Sep 4, 2020

Code review ACK.
No opionion on the concept, I think it's fine to leave these as null when you want to use bitcoin-cli with an older server, but also to hide them.

@jonatack jonatack force-pushed the getinfo-handle-older-servers-gracefully branch from ab338a1 to aa5f419 Compare October 2, 2020 12:26
@jonatack jonatack changed the title cli: degrade -getinfo gracefully for older servers cli, bugfix: degrade -getinfo gracefully for older servers Oct 15, 2020
@jonatack jonatack closed this Oct 15, 2020
@jonatack jonatack reopened this Oct 15, 2020
@jonatack jonatack changed the title cli, bugfix: degrade -getinfo gracefully for older servers cli: degrade -getinfo gracefully for older servers Oct 21, 2020
@jonatack jonatack closed this Oct 24, 2020
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants