-
Notifications
You must be signed in to change notification settings - Fork 38.7k
refactor: Remove mempool global from net #17997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fa19ce2 to
fa6ff6e
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. |
|
Concept ACK - my only concern is that this increases the number of cases in which the local and the global form of the variable are shadowing one another. How about doing something like this (in whole or in part) to simplify the call patterns overall while making the member references locally explicit: https://github.com/Empact/bitcoin/tree/2020-01-peer-logic-members |
The global will be renamed to g_mempool, so this won't be an issue. See also #17564 (comment)
Looks good. But seems to increase the diff and time needed to review, so I'd rather do it as a follow-up. |
|
Concept ACK Reduced use of globals is very welcome from a fuzzing perspective :) |
promag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa6ff6e, I think it makes more sense squashed.
|
ACK fa6ff6e code review plus I checked each existing |
fa6ff6e to
fa2c363
Compare
|
Rebased |
|
Code review ACK fa2c363cca8cb2224bc90a47362244af9a9c498e. |
fa4d4c9 to
fa484ba
Compare
|
Rebased and squashed, as requested by @promag in #17997 (review) |
fa484ba to
fad8e65
Compare
This refactor does two things: * Pass mempool in to PeerLogicValidation * Pass m_mempool around where needed
fad8e65 to
fa7fea3
Compare
|
code review ACK fa7fea3 |
|
(looking forward to the |
fa7fea3 refactor: Remove mempool global from net (MarcoFalke) Pull request description: To increase modularisation and simplify testing, remove the mempool global from net in favour of a mempool member. This is done in the same way it was done for the connection manager global. ACKs for top commit: jnewbery: code review ACK fa7fea3 Tree-SHA512: 0e3e1eefa8d6e46367bc6991d5f36c636b15ae4a3bda99b6fe6715db3240771c3d87943c6eb257d69f31929fa2f1d0973e14fc9d1353a27551dbe746eae36857
fa7fea3 refactor: Remove mempool global from net (MarcoFalke) Pull request description: To increase modularisation and simplify testing, remove the mempool global from net in favour of a mempool member. This is done in the same way it was done for the connection manager global. ACKs for top commit: jnewbery: code review ACK fa7fea3 Tree-SHA512: 0e3e1eefa8d6e46367bc6991d5f36c636b15ae4a3bda99b6fe6715db3240771c3d87943c6eb257d69f31929fa2f1d0973e14fc9d1353a27551dbe746eae36857
Summary: ``` This refactor does two things: * Pass mempool in to PeerLogicValidation * Pass m_mempool around where needed ``` Backport of core [[bitcoin/bitcoin#17997 | PR17997]]. Test Plan: ninja all check-all Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Differential Revision: https://reviews.bitcoinabc.org/D8772
To increase modularisation and simplify testing, remove the mempool global from net in favour of a mempool member.
This is done in the same way it was done for the connection manager global.