Page MenuHomePhabricator

[net_processing] Change PeerLogicValidation to hold a connman reference
ClosedPublic

Authored by Fabien on Jan 5 2021, 10:08.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable