Member variables are already passed to methods via this, so no need to pass them another time as function parameter.
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-
MarcoFalke commented at 11:54 AM on March 12, 2021: member
- fanquake added the label P2P on Mar 12, 2021
- MarcoFalke added the label Refactoring on Mar 12, 2021
- MarcoFalke force-pushed on Mar 12, 2021
- MarcoFalke cross-referenced this on Mar 12, 2021 from issue [Bundle 4/n] Prune g_chainman usage in validation-adjacent modules by dongcarl
-
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.
- DrahtBot cross-referenced this on Mar 12, 2021 from issue p2p: Clarify disconnect log message in ProcessGetBlockData, remove send bool by MarcoFalke
-
dongcarl commented at 9:17 PM on March 16, 2021: contributor
Concept ACK 😌
-
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.
jnewbery commented at 9:03 AM on March 17, 2021: memberutACK faa3e2685a9c200188889e35843c65ec8338132f
fa2a80bf12refactor: Pass PeerManagerImpl members only once
Can be reviewed with --word-diff-regex=. --ignore-all-space
MarcoFalke force-pushed on Mar 17, 2021jnewbery commented at 10:06 AM on March 17, 2021: memberutACK fa2a80bf12d87c1d8a1a98b2faa8eea6731aac0e
amitiuttarwar commented at 8:14 PM on March 17, 2021: contributorutACK fa2a80bf12d87c1d8a1a98b2faa8eea6731aac0e
DrahtBot cross-referenced this on Mar 18, 2021 from issue [Bundle 5/n] Prune g_chainman usage in RPC modules by dongcarlMarcoFalke merged this on Mar 18, 2021MarcoFalke closed this on Mar 18, 2021MarcoFalke deleted the branch on Mar 18, 2021sidhujag referenced this in commit 03dd4a3363 on Mar 18, 2021bitcoin 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
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