Skip to content

Conversation

@achow101
Copy link
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:

{
  "version": 149900,
  "protocolversion": 70015,
  "walletversion": 139900,
  "balance": 0.00000000,
  "blocks": 476281,
  "timeoffset": 0,
  "connections": 2,
  "proxy": "",
  "difficulty": 804525194568.1318,
  "testnet": false,
  "keypoololdest": 1496858803,
  "keypoolsize": 197,
  "unlocked_until": 0,
  "paytxfee": 0.00000000,
  "relayfee": 0.00001000,
  "errors": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications",
  "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"
}

I think this should be tagged for 0.15

@laanwj laanwj added this to the 0.15.0 milestone Jul 18, 2017
@laanwj
Copy link
Member

laanwj commented Jul 18, 2017

utACK

src/rpc/misc.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it's not worth to fix the indentation issue ("proxy": "host:port", and "errors": "..." are missing two spaces)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@jonasschnelli
Copy link
Contributor

utACK 1caf5b49e8184050e096a26ed7343fdd1e1c1858

@TheBlueMatt
Copy link
Contributor

utACK

@achow101 achow101 force-pushed the deprecate-getinfo branch 2 times, most recently from fab94d9 to 38a8838 Compare July 18, 2017 19:34
@achow101 achow101 force-pushed the deprecate-getinfo branch from 38a8838 to 1c9b818 Compare July 18, 2017 19:34
@maflcko
Copy link
Member

maflcko commented Jul 18, 2017

utACK 1c9b818

@laanwj laanwj merged commit 1c9b818 into bitcoin:master Jul 19, 2017
laanwj added a commit that referenced this pull request Jul 19, 2017
1c9b818 getinfo deprecation warning (Andrew Chow)

Pull request description:

  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:
  ```
  {
    "version": 149900,
    "protocolversion": 70015,
    "walletversion": 139900,
    "balance": 0.00000000,
    "blocks": 476281,
    "timeoffset": 0,
    "connections": 2,
    "proxy": "",
    "difficulty": 804525194568.1318,
    "testnet": false,
    "keypoololdest": 1496858803,
    "keypoolsize": 197,
    "unlocked_until": 0,
    "paytxfee": 0.00000000,
    "relayfee": 0.00001000,
    "errors": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications",
    "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"
  }
  ```

  I think this should be tagged for 0.15

Tree-SHA512: ea1bac96a67f797519e8748ddd661cf0a1127cbc38f145b98f10cf9b54dcf0519b353062ce9888e1f51875497299c75ff5147566944451bc3fc117620e773489
@achow101 achow101 deleted the deprecate-getinfo branch August 29, 2017 15:28
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 24, 2019
1c9b818 getinfo deprecation warning (Andrew Chow)

Pull request description:

  This is an alternative to bitcoin#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:
  ```
  {
    "version": 149900,
    "protocolversion": 70015,
    "walletversion": 139900,
    "balance": 0.00000000,
    "blocks": 476281,
    "timeoffset": 0,
    "connections": 2,
    "proxy": "",
    "difficulty": 804525194568.1318,
    "testnet": false,
    "keypoololdest": 1496858803,
    "keypoolsize": 197,
    "unlocked_until": 0,
    "paytxfee": 0.00000000,
    "relayfee": 0.00001000,
    "errors": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications",
    "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"
  }
  ```

  I think this should be tagged for 0.15

Tree-SHA512: ea1bac96a67f797519e8748ddd661cf0a1127cbc38f145b98f10cf9b54dcf0519b353062ce9888e1f51875497299c75ff5147566944451bc3fc117620e773489
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
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