refactor: Pass PeerManagerImpl members only once #21425

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2103-refactorMember changing 1 files +54 −67
  1. MarcoFalke commented at 11:54 AM on March 12, 2021: member

    Member variables are already passed to methods via this, so no need to pass them another time as function parameter.

  2. fanquake added the label P2P on Mar 12, 2021
  3. MarcoFalke added the label Refactoring on Mar 12, 2021
  4. MarcoFalke force-pushed on Mar 12, 2021
  5. MarcoFalke cross-referenced this on Mar 12, 2021 from issue [Bundle 4/n] Prune g_chainman usage in validation-adjacent modules by dongcarl
  6. DrahtBot commented at 3:06 PM on March 12, 2021: contributor

    <!--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:

    • #21391 ([Bundle 5/n] Prune g_chainman usage in RPC modules by dongcarl)
    • #21235 (p2p: Clarify disconnect log message in ProcessGetBlockData, remove send bool by MarcoFalke)

    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. DrahtBot cross-referenced this on Mar 12, 2021 from issue p2p: Clarify disconnect log message in ProcessGetBlockData, remove send bool by MarcoFalke
  8. DrahtBot commented at 4:48 PM on March 15, 2021: contributor

    <!--4a62be1de6b64f3ed646cdc7932c8cf5-->

    🕵️ @sipa has been requested to review this pull request as specified in the REVIEWERS file.

  9. dongcarl commented at 9:17 PM on March 16, 2021: contributor

    Concept ACK 😌

  10. in src/net_processing.cpp:1931 in faa3e2685a outdated
    1927 | @@ -1931,7 +1928,7 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, const Peer& peer,
    1928 |              m_connman.PushMessage(&pfrom, msgMaker.Make(NetMsgType::GETHEADERS, m_chainman.ActiveChain().GetLocator(pindexLast), uint256()));
    1929 |          }
    1930 |  
    1931 | -        bool fCanDirectFetch = CanDirectFetch(m_chainparams.GetConsensus());
    1932 | +        bool fCanDirectFetch = CanDirectFetch();
    


    jnewbery commented at 9:02 AM on March 17, 2021:

    Doesn't seem much point in having this local variable any more.


    MarcoFalke commented at 9:36 AM on March 17, 2021:

    Thanks, fixed.

  11. jnewbery commented at 9:03 AM on March 17, 2021: member

    utACK faa3e2685a9c200188889e35843c65ec8338132f

  12. refactor: Pass PeerManagerImpl members only once
    Can be reviewed with
    
    --word-diff-regex=. --ignore-all-space
    fa2a80bf12
  13. MarcoFalke force-pushed on Mar 17, 2021
  14. jnewbery commented at 10:06 AM on March 17, 2021: member

    utACK fa2a80bf12d87c1d8a1a98b2faa8eea6731aac0e

  15. amitiuttarwar commented at 8:14 PM on March 17, 2021: contributor

    utACK fa2a80bf12d87c1d8a1a98b2faa8eea6731aac0e

  16. DrahtBot cross-referenced this on Mar 18, 2021 from issue [Bundle 5/n] Prune g_chainman usage in RPC modules by dongcarl
  17. MarcoFalke merged this on Mar 18, 2021
  18. MarcoFalke closed this on Mar 18, 2021

  19. MarcoFalke deleted the branch on Mar 18, 2021
  20. sidhujag referenced this in commit 03dd4a3363 on Mar 18, 2021
  21. bitcoin locked this on Aug 18, 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-05-20 06:54 UTC