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.
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.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, 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.
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
The global will be renamed to g_mempool, so this won’t be an issue. See also #17564 (review)
How about doing something like this (in whole or in part) to simplify the call patterns overall while making the member references locally explicit:
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 :)
mempool
reference to ensure there were no remaining references to ::mempool
.
This refactor does two things:
* Pass mempool in to PeerLogicValidation
* Pass m_mempool around where needed
mempool
-> g_mempool
rename)