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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Oct 25 2021, 09:05
deadalnix added inline comments.
src/avalanche/peermanager.cpp
259 ↗(On Diff #30657)

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

src/avalanche/peermanager.h
290 ↗(On Diff #30657)

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.