net processing: Move remaining globals into PeerManagerImpl#24543
net processing: Move remaining globals into PeerManagerImpl#24543maflcko merged 7 commits intobitcoin:masterfrom
Conversation
406704a to
4e57b8a
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
4e57b8a to
7cba3e8
Compare
|
Concept ACK. |
jnewbery
left a comment
There was a problem hiding this comment.
Concept and approach ACK. A few minor suggestions inline.
7cba3e8 to
8c08e33
Compare
|
Thanks @jnewbery for the review! I took all your suggestions. |
jnewbery
left a comment
There was a problem hiding this comment.
Code review ACK 8c08e33f678bd10254fc4ca1ed6f47ad52b027a5.
A couple of small suggestions inline.
8c08e33 to
822152c
Compare
jnewbery
left a comment
There was a problem hiding this comment.
Code review ACK 822152c50654228a926ec56819878a5429d75c2e
822152c to
41b08b1
Compare
|
Code review ACK 41b08b114f7494aa452dd5c15c10242651a9d12d Thank you for such quick responses to my review comments! |
41b08b1 to
45f3b1d
Compare
|
Rebased |
|
ACK 45f3b1dbebf799b386907de1a4eed20777e92073 Verified rebase by doing it myself and comparing. |
45f3b1d to
79f6a55
Compare
|
Rebased |
|
Code review ACK 79f6a554354fa923167979faf8cf8f3120fc9bfa I noticed the following line in It's perhaps out of scope for this PR, but perhaps that should be made a member variable of |
We inline `UpdatePreferredDownload` because it is only used in one location during the version handshake. We simplify it by removing the initial subtraction of `state->fPreferredDownload` from `nPreferredDownload`. This is ok since the version handshake is only called once per peer and `state->fPreferredDownload` will always be false before the newly inlined code is called, making the subtraction a noop.
79f6a55 to
8fa7fa0
Compare
|
Rebased and added a commit (da9e51a1fe704d4a6a93de34e6837fab37655860) to move |
jnewbery
left a comment
There was a problem hiding this comment.
Code review ACK 8fa7fa0cb04661c06fc1fd44667bfebcc6716a9d
-BEGIN VERIFY SCRIPT-
ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); }
ren mapNodeState m_node_states
ren cs_most_recent_block m_most_recent_block_mutex
ren most_recent_block m_most_recent_block
ren most_recent_compact_block m_most_recent_compact_block
ren most_recent_block_hash m_most_recent_block_hash
ren fWitnessesPresentInMostRecentCompactBlock m_most_recent_compact_block_has_witnesses
ren nPreferredDownload m_num_preferred_download_peers
ren nHighestFastAnnounce m_highest_fast_announce
-END VERIFY SCRIPT-
8fa7fa0 to
778343a
Compare
|
Code review ACK 778343a |
maflcko
left a comment
There was a problem hiding this comment.
ACK 778343a 🗒
Show signature
Signature:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
ACK 778343a379026ef233dffea67f5226565f6d5720 🗒
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUjBIwv+MjgYz0poUymP0rv825e0CNNMrgOXg5hJmGXAF7dDpzn6Kqje2icEX1Iy
vNbpPsRDachm/67cOdTJinNgw8TStVI+KxURKCSCl1A30Xz01groLbTyXjVn2gwy
Bk9HoIRpa0CLbvGenk2OW6jjxYFgbK81TKDTHqHEM6laayMlKHFaloO/AlB+SfYL
TRNCBjxGnzoBzPfG3d5JMI5Rt15lBSvKRm6dCe5pnUdDLJyfJLVT5CIb606Tkxoz
0ASF4H0nvsdPCR5t3T+spy8fFDgmsUwtUNbpOAKKkm3Vmr1EGxHxyGCW3Uyq3eLQ
YKefQrFjp21dcxeCeCcsZp30Ropssp1Dc1bOBgPIworvUzTlb8H/WU1aDr16Eis+
/GITCLQ75eifYYaPPEPnJxLwW8QLE4k38zhmYKtR8EafRpB8Zh1NAt+TSWB8iSOl
yjRfMQGD7TeIDVnXzOz+fEwzI7JVsexqhu1BD14Xfx3pUsXfclbnFWHH2/0XaTwp
59A5jsEa
=56fQ
-----END PGP SIGNATURE-----
This PR moves the remaining net processing globals into
PeerManagerImpl. This will make testing the peer manager in isolation easier and also acts as a code clean up.