net: make CNode::m_inbound_onion public, initialize explicitly #21167

pull jonatack wants to merge 2 commits into bitcoin:master from jonatack:m_inbound_onion-make-public-and-explicit changing 4 files +18 −21
  1. jonatack commented at 10:39 PM on February 12, 2021: member

    Refactoring only, no change in behavior. This is a quick follow-up to #20210 to address these review comments:

    Changes:

    • make the CNode::m_inbound_onion class member public, update the Doxygen comment, drop the getter, and update the tests
    • remove the CNode::m_inbound_onion default value initialization in the ctor declaration and the member initializer in favor of always passing it explicitly to the ctor where we initialize it dynamically, to both clarify the caller code and to allow the compiler to warn if it is uninitialized in the ctor or omitted in the caller
  2. net: make CNode::m_inbound_onion public, drop getter, update tests 24bda56c29
  3. net: remove CNode::m_inbound_onion defaults for explicitness
    and to allow the compiler to warn if uninitialized in the ctor
    or omitted in the caller.
    2ee4a7a9ec
  4. DrahtBot added the label P2P on Feb 12, 2021
  5. in src/net.cpp:2863 in 2ee4a7a9ec
    2860 |        id(idIn),
    2861 |        nLocalHostNonce(nLocalHostNonceIn),
    2862 |        m_conn_type(conn_type_in),
    2863 | -      nLocalServices(nLocalServicesIn),
    2864 | -      m_inbound_onion(inbound_onion)
    2865 | +      nLocalServices(nLocalServicesIn)
    


    jonatack commented at 10:44 PM on February 12, 2021:

    Argument order changed for -Wreorder initialization order (in this case public members first, then private)

  6. DrahtBot commented at 7:42 AM on February 13, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #21162 (Net Processing: Move RelayTransaction() into PeerManager by jnewbery)
    • #21160 (Net/Net processing: Move tx inventory into net_processing by jnewbery)
    • #20966 (banman: save the banlist in a JSON format on disk by vasild)
    • #20729 (p2p: standardize outbound full/block relay connection type naming by jonatack)
    • #20721 (Net: Move ping data to net_processing by jnewbery)
    • #20685 (Add I2P support using I2P SAM by vasild)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  7. vasild approved
  8. vasild commented at 2:11 PM on February 15, 2021: member

    ACK 2ee4a7a9ec68c75094685c06ec793b614f44c4ce

  9. MarcoFalke commented at 2:19 PM on February 15, 2021: member

    review ACK 2ee4a7a9ec68c75094685c06ec793b614f44c4ce 🏀

    <details><summary>Show signature and timestamp</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    review ACK 2ee4a7a9ec68c75094685c06ec793b614f44c4ce 🏀
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUikCQwAmcVC6fMv+9n4gQS8nzxAp37R5inc1fOah+e7LO71NXIv2KYFtyd4JKk0
    q5ZMK/mR2VQmSbyt18nsSZYK+FDobjqT2GWR5Z69/d+yOiZsWpgfVrhmyHom4CTB
    AW4gk2QKPgYbsQZOUw5W/n8kNLVjYSSsbS7iX8Gav0mPryomJT+ymboi0JU72z3o
    ol+B7XLf99muaPtVZVyubKXRZDsMHLmofqiRPbLGiUByF2Algl+67BMvKRCWct3Y
    o6/oVC1zeRov9/0wC2zrtCFuhSy7q+EXR0jm99kW5L63YVb/czgUZiEuh8oPzPK5
    VbxxpDlGzt82XoPzdWQPZKN1/uYsbt8oEHjr7N1SrhhF4qhMVlVIS6QN/nN52qnD
    PnVxrBZnXNPZbVIu5Y6peh6Zkq4y/23CwSFag3nbzf+3RkDfbx7CP1RscDmSYRJH
    Vl1SEBrWFHFwoLb0zoURPX0OGy8HQneO1hB3B+z0DKEpuvLytwE+jz/ax/NNc6gZ
    2/dY9Uz7
    =FVLs
    -----END PGP SIGNATURE-----
    

    Timestamp of file with hash e099c9167b3f072f4f1ab5a70468aaf73041ab7a8fb7856044b91115cae08bca -

    </details>

  10. MarcoFalke merged this on Feb 15, 2021
  11. MarcoFalke closed this on Feb 15, 2021

  12. jonatack deleted the branch on Feb 15, 2021
  13. sidhujag referenced this in commit 114b96a32f on Feb 15, 2021
  14. Fabcien referenced this in commit c7840f727e on Feb 4, 2022
  15. DrahtBot locked this on Aug 16, 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-29 03:14 UTC

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