-
Notifications
You must be signed in to change notification settings - Fork 37.7k
[rpc] Deprecate getinfo #8780
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
[rpc] Deprecate getinfo #8780
Conversation
This was replaced by getmininginfo, getnetworkinfo and getwalletinfo
faa18e7
to
ddddaaf
Compare
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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
utACK ddddaaf |
Wait, |
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 basically still exists as a convenience for people using bitcoin-cli manually, but as that it could just as well be implemented client-side... |
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. |
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. |
Done |
FYI I just did this: #8843 |
Github-Pull: bitcoin#8780 Rebased-From: fa6e71b
This was replaced by getmininginfo, getnetworkinfo and getwalletinfo