HomePhabricator

[net_processing] Change PeerLogicValidation to hold a connman reference

Description

[net_processing] Change PeerLogicValidation to hold a connman reference

Summary:

`
Hold a reference to connman rather than a pointer because:

- PeerLogicValidation can't run without a connman
- The pointer never gets reseated

The alternative is to always assert that the pointer is non-null before
dereferencing.

Change the name from connman to m_connman at the same time to conform
with current style guidelines.

Partial backport (1/2) of core PR19704:
https://github.com/bitcoin/bitcoin/pull/19704/commits/c556770b5ef4306f10e980daff772bee87daaa30

Depends on D8777.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Aug 12 2020, 10:38
FabienCommitted on Jan 6 2021, 10:40
FabienPushed on Jan 6 2021, 10:42
Reviewer
Restricted Project
Differential Revision
D8781: [net_processing] Change PeerLogicValidation to hold a connman reference
Parents
rABC25d0b1e38a93: net: Avoid redundant and confusing FAILED log
Branches
Unknown
Tags
Unknown