Page MenuHomePhabricator

avalanche: method to get std::vector<avalanche::Node> associated with a PeerId
AbandonedPublic

Authored by majcosta on Aug 30 2021, 11:38.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

as title

Test Plan
ninja check-avalanche-peermanager_tests

Diff Detail

Repository
rABC Bitcoin ABC
Branch
get_nodes_belonging_to_a_peer
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16464
Build 32791: Build Diffbuild-clang-tidy · lint-circular-dependencies · build-clang · build-debug · build-without-wallet · build-diff
Build 32790: arc lint + arc unit

Event Timeline

Fabien requested changes to this revision.Aug 30 2021, 11:56
Fabien added a subscriber: Fabien.

What is the use case for this ? And isn't possible to achieve what you want with the existing forEachNode() that won't make a copy of each node ?

src/avalanche/peermanager.h
238 ↗(On Diff #29637)

Proof broadcast API. is not the right section for this

This revision now requires changes to proceed.Aug 30 2021, 11:56

the point of this is when a p2p node asks another for which nodes he has for a given proof

addressed feedback about avoiding copies of avalanche:Node objects (NodeId is what we care about, really) and moved the method declaration to a more appropriate line