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. DrahtBot commented at 3:06 pm on March 12, 2021: member

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

    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.

  6. DrahtBot commented at 4:48 pm on March 15, 2021: member

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

  7. dongcarl commented at 9:17 pm on March 16, 2021: member
    Concept ACK 😌
  8. 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.
  9. jnewbery commented at 9:03 am on March 17, 2021: member
    utACK faa3e2685a9c200188889e35843c65ec8338132f
  10. refactor: Pass PeerManagerImpl members only once
    Can be reviewed with
    
    --word-diff-regex=. --ignore-all-space
    fa2a80bf12
  11. MarcoFalke force-pushed on Mar 17, 2021
  12. jnewbery commented at 10:06 am on March 17, 2021: member
    utACK fa2a80bf12d87c1d8a1a98b2faa8eea6731aac0e
  13. amitiuttarwar commented at 8:14 pm on March 17, 2021: contributor
    utACK fa2a80bf12d87c1d8a1a98b2faa8eea6731aac0e
  14. MarcoFalke merged this on Mar 18, 2021
  15. MarcoFalke closed this on Mar 18, 2021

  16. MarcoFalke deleted the branch on Mar 18, 2021
  17. sidhujag referenced this in commit 03dd4a3363 on Mar 18, 2021
  18. DrahtBot 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: 2024-12-18 21:12 UTC

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