Page MenuHomePhabricator

[avalanche] Remove the (node) PeerManager member from the avalanche processor
ClosedPublic

Authored by Fabien on Aug 6 2021, 12:04.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC28d7e648ffc5: [avalanche] Remove the (node) PeerManager member from the avalanche processor
Summary

This makes it possible to remove the net_processing.h header from the processor.
This is a step toward reducing the coupling between the avalanche and network layers.

Ref T1634.

Test Plan
ninja all check-all
./contrib/teamcity/build-configurations.py lint-circular-dependencies

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_remove_peermanager_processor
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16279
Build 32425: Build Diffbuild-clang-tidy · build-without-wallet · lint-circular-dependencies · build-debug · build-diff · build-clang
Build 32424: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Aug 6 2021, 12:04
majcosta requested changes to this revision.Aug 6 2021, 19:25
majcosta added a subscriber: majcosta.
majcosta added inline comments.
src/avalanche/processor.h
270–272

this interface would probably make the rest of the diff a lot simpler

src/net_processing.cpp
4362–4366

for example, here:

This revision now requires changes to proceed.Aug 6 2021, 19:25
Fabien requested review of this revision.Aug 9 2021, 06:39

I don't think this makes the API more clear: you need to special case part of the returned value to determine if the call was successful while a bool is straightforward. This is also more consistent with the other parts of the codebase.

This revision is now accepted and ready to land.Aug 9 2021, 15:40