Page MenuHomePhabricator

[avalanche] Check utxos integrity in the peer manager
ClosedPublic

Authored by Fabien on Oct 20 2021, 15:02.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC57994f2eff21: [avalanche] Check utxos integrity in the peer manager
Summary

This extends the verify() method (testing only) to include a consistency check for the utxos map. This will be useful to make sure we are not making a mess when dealing with conflicting proofs.

Ref T1854.

Test Plan
ninja check-avalanche

Diff Detail

Event Timeline

Fabien requested review of this revision.Oct 20 2021, 15:02
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/avalanche/peermanager.cpp
429
if (it == utxos.end() || it->second != p.peerid) {

would have been more elegant

This revision is now accepted and ready to land.Oct 20 2021, 15:26
src/avalanche/peermanager.cpp
429

That's on purpose, since it's a testing only method it makes it easier to debug what the problem is (I actually used it that way for my own needs)