[RPC] Add a deprecation warning to getinfo’s output #10857

pull achow101 wants to merge 1 commits into bitcoin:master from achow101:deprecate-getinfo changing 1 files +5 −2
  1. achow101 commented at 10:35 pm on July 17, 2017: member

    This is an alternative to #10841

    This PR implements @gmaxwell’s suggestion of a nag field for getinfo which warns about the deprecation. Instead of calling it nag, I have named it deprecation-warning. The output of getinfo will look like this:

     0{
     1  "version": 149900,
     2  "protocolversion": 70015,
     3  "walletversion": 139900,
     4  "balance": 0.00000000,
     5  "blocks": 476281,
     6  "timeoffset": 0,
     7  "connections": 2,
     8  "proxy": "",
     9  "difficulty": 804525194568.1318,
    10  "testnet": false,
    11  "keypoololdest": 1496858803,
    12  "keypoolsize": 197,
    13  "unlocked_until": 0,
    14  "paytxfee": 0.00000000,
    15  "relayfee": 0.00001000,
    16  "errors": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications",
    17  "deprecation-warning": "WARNING: getinfo is deprecated and will be fully removed in 0.16. Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo before upgrading to 0.16"
    18}
    

    I think this should be tagged for 0.15

  2. fanquake added the label RPC/REST/ZMQ on Jul 18, 2017
  3. laanwj added this to the milestone 0.15.0 on Jul 18, 2017
  4. laanwj commented at 6:38 am on July 18, 2017: member
    utACK
  5. in src/rpc/misc.cpp:69 in 1caf5b49e8 outdated
    65@@ -66,6 +66,7 @@ UniValue getinfo(const JSONRPCRequest& request)
    66             "  \"paytxfee\": x.xxxx,         (numeric) the transaction fee set in " + CURRENCY_UNIT + "/kB\n"
    67             "  \"relayfee\": x.xxxx,         (numeric) minimum relay fee for transactions in " + CURRENCY_UNIT + "/kB\n"
    68             "  \"errors\": \"...\"           (string) any error messages\n"
    69+            "  \"deprecation-warning\": \"...\" (string) warning that the getinfo command is deprecated and will be removed in 0.16"
    


    MarcoFalke commented at 11:54 am on July 18, 2017:
    Would slightly prefer if this was moved all the way up (pushed back as first string into the dict), such that it is harder to overlook.

    jonasschnelli commented at 11:58 am on July 18, 2017:
    I guess it’s not worth to fix the indentation issue ("proxy": "host:port", and "errors": "..." are missing two spaces)?

    achow101 commented at 7:34 pm on July 18, 2017:
    Done.
  6. jonasschnelli commented at 11:58 am on July 18, 2017: contributor
    utACK 1caf5b49e8184050e096a26ed7343fdd1e1c1858
  7. TheBlueMatt commented at 4:00 pm on July 18, 2017: member
    utACK
  8. achow101 force-pushed on Jul 18, 2017
  9. achow101 force-pushed on Jul 18, 2017
  10. getinfo deprecation warning 1c9b818756
  11. achow101 force-pushed on Jul 18, 2017
  12. MarcoFalke commented at 9:40 pm on July 18, 2017: member
    utACK 1c9b818
  13. laanwj merged this on Jul 19, 2017
  14. laanwj closed this on Jul 19, 2017

  15. laanwj referenced this in commit d445a2c2ea on Jul 19, 2017
  16. achow101 deleted the branch on Aug 29, 2017
  17. PastaPastaPasta referenced this in commit 7dc442fe98 on Jul 17, 2019
  18. PastaPastaPasta referenced this in commit e29dba1356 on Jul 17, 2019
  19. PastaPastaPasta referenced this in commit 394b211ba8 on Jul 23, 2019
  20. PastaPastaPasta referenced this in commit b535dfbc41 on Jul 24, 2019
  21. barrystyle referenced this in commit 2f01e0bf42 on Jan 22, 2020
  22. 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-12-18 18:12 UTC

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