Page MenuHomePhabricator

[avalanche] Select if a conflicting proof should be preferred
ClosedPublic

Authored by Fabien on Oct 25 2021, 09:05.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC3d9964eca1e9: [avalanche] Select if a conflicting proof should be preferred
Summary

This diff adds a function to select if a conflicting proof should be preferred over an existing one. This function will be used to determine if a conflicting proof should be added to the regular proof pool or the orphan proof in a follow up.

Ref T1854.

Depends on D10377.

Test Plan
ninja check-avalanche

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_peermanager_prefer_proof
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17114
Build 34060: Build Difflint-circular-dependencies · build-diff · build-debug · build-without-wallet · build-clang · build-clang-tidy
Build 34059: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Oct 25 2021, 09:05
deadalnix added inline comments.
src/avalanche/peermanager.cpp
259

Some comment explaining how these parameters are chosen would be good.

src/avalanche/peermanager.h
290

It is unclear if this is a a tell or an ask. It looks like a tell, but that make no sense as a free function.

Improve the name and expand a bit on the choosen parameters

deadalnix added inline comments.
src/avalanche/peermanager.cpp
266 ↗(On Diff #30669)

Shouldn't this be another proof comparator instead?

This revision is now accepted and ready to land.Oct 27 2021, 14:17
src/avalanche/peermanager.cpp
266 ↗(On Diff #30669)

This is very specific and in the end it will be a static function, so I don't feel like it's needed to make it even more public API.