Skip to content
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

[Feature] Return version in getnetworkinfo the way ABC/BCHN does #386

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

zquestz
Copy link
Contributor

@zquestz zquestz commented Jul 18, 2020

Currently the version string in BCHD returns in a format different than other BCH nodes. This makes people parsing this value have a hard time, so I figured we should update it. The version.Numeric() function is only called in one place in any gcash code, and is exclusively used in getnetworkinfo.

While this is a breaking change if someone is parsing it, I think it should be fine to change without a major version bump.

Here is a sample response:

{
  "version": 160400,
  "subversion": "/bchd:0.16.4(EB32.0)/",
  "protocolversion": 70015,
  "localservices": "SFNodeNetwork|SFNodeBloom|SFNodeBitcoinCash|SFNodeCF",
  "localrelay": true,
  "timeoffset": 0,
  "connections": 14,
  "networkactive": true,
  "networks": [
    {
      "name": "ipv4",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "ipv6",
      "limited": false,
      "reachable": false,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "onion",
      "limited": false,
      "reachable": false,
      "proxy": "",
      "proxy_randomize_credentials": false
    }
  ],
  "relayfee": 0.00001,
  "incrementalfee": 0.00001,
  "localaddresses": [
    {
      "address": "76.102.192.81",
      "port": 8333,
      "score": 4
    }
  ],
  "warnings": "Warning: Unknown block versions being mined! It's possible unknown rules are in effect."
}

@cpacia cpacia merged commit eb5f173 into master Jul 22, 2020
@cpacia cpacia deleted the sane-version branch March 16, 2021 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants