HomePhabricator

refactor: replace CConnman pointers by references in net_processing.cpp

Description

refactor: replace CConnman pointers by references in net_processing.cpp

Summary:

This is a follow-up to the recently merged PR #19053, replacing two more
types of one more type of pointer (CConnman) by references to increase
the code quality -- pointers should either check for nullptr or be
replaced by references, and the latter strategy seems to be more
reasonable.

Again, to keep the review burden managable, the changes are kept simple,

    only tackling CConnman* and BanMan* pointers
    only within the net_processing module, i.e. no changes that would
need adaption in other modules
    keeping the names of the variables as they are

Backport of core PR19174.

Depends on D8479.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8480

Details

Provenance
Sebastian Falbesoner <sebastian.falbesoner@gmail.com>Authored on Jun 4 2020, 22:55
FabienCommitted on Nov 21 2020, 07:50
FabienPushed on Nov 21 2020, 07:51
Reviewer
Restricted Project
Differential Revision
D8480: refactor: replace CConnman pointers by references in net_processing.cpp
Parents
rABCada27e66ecbc: net: Make addr relay mockable, add test
Branches
Unknown
Tags
Unknown