[doc] Tiny followups to new getpeerinfo connection type field #20090

pull amitiuttarwar wants to merge 2 commits into bitcoin:master from amitiuttarwar:2020-09-getpeerinfo-conn-type-release-notes changing 2 files +16 −10
  1. amitiuttarwar commented at 8:52 PM on October 5, 2020: contributor

    two commits addressing small followups from #19725

    • first commit adds a clarification in the release notes that this field shouldn't be expected to be stable (suggested by sdaftuar in #19725 (comment))

    • second commit moves the CONNECTION_TYPE_DOC object out of the header file to reduce the size of the binary (suggested by MarcoFalke in #19725 (review), he tested and found a decrease of 10kB)

  2. DrahtBot added the label Docs on Oct 5, 2020
  3. DrahtBot added the label P2P on Oct 5, 2020
  4. amitiuttarwar removed the label P2P on Oct 5, 2020
  5. in doc/release-notes.md:112 in f476fbdf84 outdated
     107 | @@ -108,6 +108,8 @@ will trigger BIP 125 (replace-by-fee) opt-in. (#11413)
     108 |  - The `getpeerinfo` RPC now returns a `connection_type` field. This indicates
     109 |    the type of connection established with the peer. It will return one of six
     110 |    options. For more information, see the `getpeerinfo` help documentation.
     111 | +  Please note that this string output is unlikely to be stable in upcoming
     112 | +  releases as we iterate to best capture connection behaviors.
    


    MarcoFalke commented at 5:45 AM on October 6, 2020:

    This is a generally correct statement, that could go into the RPC help instead?


    amitiuttarwar commented at 11:13 PM on October 9, 2020:

    done

  6. [doc] Improve help for getpeerinfo connection_type field. 3069b56a45
  7. [trivial] Extract connection type doc into file where it is used.
    This slightly reduces the size of the binary.
    41dca087b7
  8. in src/net.h:119 in f476fbdf84 outdated
     121 | -    "block-relay-only (does not relay transactions or addresses)",
     122 | -    "inbound (initiated by the peer)",
     123 | -    "manual (added via addnode RPC or -addnode/-connect configuration options)",
     124 | -    "addr-fetch (short-lived automatic connection for soliciting addresses)",
     125 | -    "feeler (short-lived automatic connection for testing addresses)"};
     126 | +extern const std::vector<std::string> CONNECTION_TYPE_DOC;
    


    promag commented at 7:56 AM on October 7, 2020:

    f476fbdf84c88b7ab90aa3e9240b39806525a8b6

    not sure if this was asked before, CONNECTION_TYPE_DOC is used only in src/rpc/net.cpp, why not just have it there?


    amitiuttarwar commented at 11:13 PM on October 9, 2020:

    hmm, good point!

    history: Marco suggested extracting in #19725 (review). I thought a benefit was to keep CONNECTION_TYPE_DOC next to ConnectionType definition for future updates, but now we don't have that regardless. I've moved into src/rpc/net.cpp and added a comment on the ConnectionType enum for future code changes.

  9. amitiuttarwar force-pushed on Oct 9, 2020
  10. MarcoFalke added this to the milestone 0.21.0 on Oct 12, 2020
  11. achow101 commented at 9:46 PM on October 13, 2020: member

    ACK 41dca087b73a3627107603694f5a982ea2a53189

  12. laanwj commented at 6:45 PM on October 15, 2020: member

    Code review ACK 41dca087b73a3627107603694f5a982ea2a53189

  13. laanwj merged this on Oct 15, 2020
  14. laanwj closed this on Oct 15, 2020

  15. sidhujag referenced this in commit 50f8aee5b4 on Oct 16, 2020
  16. DrahtBot locked this on Feb 15, 2022

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-04-20 18:14 UTC

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