[rpc] Deprecate getinfo #8780

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:Mf1609-getinfoDeprecate changing 3 files +27 −21
  1. MarcoFalke commented at 6:52 pm on September 21, 2016: member
    This was replaced by getmininginfo, getnetworkinfo and getwalletinfo
  2. MarcoFalke added the label RPC/REST/ZMQ on Sep 21, 2016
  3. [rpc] Deprecate getinfo
    This was replaced by getmininginfo, getnetworkinfo and getwalletinfo
    ddddaafa4a
  4. MarcoFalke force-pushed on Sep 21, 2016
  5. MarcoFalke commented at 7:20 pm on September 21, 2016: member
    Added commit body per @gmaxwell
  6. in qa/rpc-tests/rpcbind_test.py: in ddddaafa4a outdated
    43@@ -44,15 +44,15 @@ def run_bind_test(self, allow_ips, connect_to, addresses, expected):
    44 
    45     def run_allowip_test(self, allow_ips, rpchost, rpcport):
    46         '''
    47-        Start a node with rpcwallow IP, and request getinfo
    48+        Start a node with rpcwallow IP, and request getnetworkinfo
    


    paveljanik commented at 7:38 pm on September 21, 2016:
    rpcwallow -> rpcallow
  7. in src/rpc/misc.cpp: in ddddaafa4a outdated
    43@@ -44,7 +44,7 @@ UniValue getinfo(const UniValue& params, bool fHelp)
    44     if (fHelp || params.size() != 0)
    45         throw runtime_error(
    46             "getinfo\n"
    47-            "Returns an object containing various state info.\n"
    48+            "\nDEPRECATED. Returns an object containing various state info.\n"
    


    laanwj commented at 3:05 am on September 22, 2016:
    This method has been deprecated for years, we didn’t even mention this in the help message yet? Ouch.

    MarcoFalke commented at 1:04 pm on September 25, 2016:
    I wonder if anyone types in help getinfo. (Otherwise no one will see the DEPRECATED warning anyway)

    laanwj commented at 1:31 pm on September 25, 2016:

    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.

  8. achow101 commented at 3:11 am on September 22, 2016: member

    This method has been deprecated for years

    Wait, getinfo is deprecated? Since when?!

  9. laanwj commented at 3:38 am on September 22, 2016: member

    My sarcasm meter isn’t functioning this early in the morning, but at least since 2014: f9de17ec2f3e22fe9d96557e328af836a3590660 . 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…

  10. dcousens approved
  11. gmaxwell commented at 6:52 pm on September 22, 2016: 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.
  12. laanwj commented at 11:07 am on September 25, 2016: member
    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.
  13. [qa] Add getinfo smoke tests and rework versionbits test fa6e71b27d
  14. MarcoFalke commented at 1:08 pm on September 25, 2016: member
    Done
  15. laanwj merged this on Sep 26, 2016
  16. laanwj closed this on Sep 26, 2016

  17. laanwj referenced this in commit dd20ed1223 on Sep 26, 2016
  18. MarcoFalke deleted the branch on Sep 26, 2016
  19. laanwj commented at 2:12 pm on September 30, 2016: member

    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

  20. MarcoFalke referenced this in commit 794b007896 on Oct 3, 2016
  21. codablock referenced this in commit 46b1c98218 on Sep 19, 2017
  22. codablock referenced this in commit 0028dbfbfd on Jan 11, 2018
  23. meshcollider referenced this in commit aece8a4637 on Jan 24, 2018
  24. andvgal referenced this in commit 3b5e3ca56a on Jan 6, 2019
  25. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me