[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:None 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:None 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. laanwj cross-referenced this on Sep 26, 2016 from issue TODO for release notes 0.14.0 by laanwj
  19. MarcoFalke deleted the branch on Sep 26, 2016
  20. laanwj cross-referenced this on Sep 29, 2016 from issue rpc: Handle `getinfo` client-side in bitcoin-cli w/ `-getinfo` by laanwj
  21. 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

  22. MarcoFalke referenced this in commit 794b007896 on Oct 3, 2016
  23. codablock referenced this in commit 46b1c98218 on Sep 19, 2017
  24. promag cross-referenced this on Sep 21, 2017 from issue Why is getinfo being removed? by thequillmagazine
  25. fanquake cross-referenced this on Nov 13, 2017 from issue Why was the 'getinfo' command removed? by ilsawa
  26. codablock referenced this in commit 0028dbfbfd on Jan 11, 2018
  27. meshcollider referenced this in commit aece8a4637 on Jan 24, 2018
  28. bitcoinhodler cross-referenced this on Feb 2, 2018 from issue Bitcoin Core v0.16: getinfo removed by bitcoinhodler
  29. dagurval cross-referenced this on Mar 9, 2018 from issue [qa] util: Move wait_bitcoinds() into stop_nodes() by dagurval
  30. jnewbery cross-referenced this on Aug 14, 2018 from issue [RPC] Remove getinfo deprecation warning by jnewbery
  31. andvgal referenced this in commit 3b5e3ca56a on Jan 6, 2019
  32. Talkless cross-referenced this on Jul 24, 2019 from issue bitcoind_: LookupError: 'base64' is not a text encoding; use codecs.encode() to handle arbitrary codecs by Talkless
  33. ankh2054 cross-referenced this on Oct 24, 2019 from issue add getnetworkinfo RPC by ankh2054
  34. bitcoin 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: 2026-05-19 06:55 UTC