Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Sep 21, 2016

This was replaced by getmininginfo, getnetworkinfo and getwalletinfo

This was replaced by getmininginfo, getnetworkinfo and getwalletinfo
@maflcko maflcko force-pushed the Mf1609-getinfoDeprecate branch from faa18e7 to ddddaaf Compare September 21, 2016 19:19
@maflcko
Copy link
Member Author

maflcko commented Sep 21, 2016

Added commit body per @gmaxwell

@@ -44,15 +44,15 @@ def run_bind_test(self, allow_ips, connect_to, addresses, expected):

def run_allowip_test(self, allow_ips, rpchost, rpcport):
'''
Start a node with rpcwallow IP, and request getinfo
Start a node with rpcwallow IP, and request getnetworkinfo
Copy link
Contributor

Choose a reason for hiding this comment

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

rpcwallow -> rpcallow

@@ -44,7 +44,7 @@ UniValue getinfo(const UniValue& params, bool fHelp)
if (fHelp || params.size() != 0)
throw runtime_error(
"getinfo\n"
"Returns an object containing various state info.\n"
"\nDEPRECATED. Returns an object containing various state info.\n"
Copy link
Member

Choose a reason for hiding this comment

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

This method has been deprecated for years, we didn't even mention this in the help message yet? Ouch.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder if anyone types in help getinfo. (Otherwise no one will see the DEPRECATED warning anyway)

Copy link
Member

Choose a reason for hiding this comment

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

Well, people use the help system. It's the only up-to-date RPC documentation that there is, and errors are usually found quickly.

But maybe not for old calls. Of course it may make sense to mention it in the release notes as well. I don't think we ever did, but even if so a reminder probably can't hurt.

@laanwj
Copy link
Member

laanwj commented Sep 22, 2016

utACK ddddaaf

@achow101
Copy link
Member

achow101 commented Sep 22, 2016

This method has been deprecated for years

Wait, getinfo is deprecated? Since when?!

@laanwj
Copy link
Member

laanwj commented Sep 22, 2016

My sarcasm meter isn't functioning this early in the morning, but at least since 2014: f9de17e . Probably even earlier, should be possible to find more discussion on github. Some of the more serious problems with it are:

  • It combines information from different subsystems (wallet, networking, blockchain, ...), so its implementation is messy by definition and has to lock all over the place
  • It is ill-defined and without focus - what information should be added, what shouldn't
  • It behaves differently with and without wallet (and what should it do with multiple wallets)

It basically still exists as a convenience for people using bitcoin-cli manually, but as that it could just as well be implemented client-side...

@gmaxwell
Copy link
Contributor

Should we leave in some tests of getinfo in parallel as long as it still exists? We wouldn't want it to stop working by mistake.

@laanwj
Copy link
Member

laanwj commented Sep 25, 2016

Agree with @gmaxwell - keeping at least one test that exercises getinfo makes sense. I don't think it's necessary to repeat all tests with getinfo and with the new call, though.

@maflcko
Copy link
Member Author

maflcko commented Sep 25, 2016

Done

@laanwj laanwj merged commit fa6e71b into bitcoin:master Sep 26, 2016
laanwj added a commit that referenced this pull request Sep 26, 2016
fa6e71b [qa] Add getinfo smoke tests and rework versionbits test (MarcoFalke)
ddddaaf [rpc] Deprecate getinfo (MarcoFalke)
@laanwj laanwj mentioned this pull request Sep 26, 2016
18 tasks
@maflcko maflcko deleted the Mf1609-getinfoDeprecate branch September 26, 2016 13:06
@laanwj
Copy link
Member

laanwj commented Sep 30, 2016

It basically still exists as a convenience for people using bitcoin-cli manually, but as that it could just as well be implemented client-side...

FYI I just did this: #8843

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Oct 3, 2016
codablock pushed a commit to codablock/dash that referenced this pull request Jan 11, 2018
fa6e71b [qa] Add getinfo smoke tests and rework versionbits test (MarcoFalke)
ddddaaf [rpc] Deprecate getinfo (MarcoFalke)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
fa6e71b [qa] Add getinfo smoke tests and rework versionbits test (MarcoFalke)
ddddaaf [rpc] Deprecate getinfo (MarcoFalke)
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.

6 participants