Page MenuHomePhabricator

[avalanche] Add a conflicting proof registration method
Needs RevisionPublic

Authored by Fabien on Fri, Oct 8, 14:15.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

This will remove all the conflicting peers, then create a new one from the conflicting proof.

Ret T1854.

Test Plan
ninja ninja check-avalanche-peermanager_tests

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_register_conflicting_proof
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16970
Build 33776: Build Difflint-circular-dependencies · build-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang
Build 33775: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Fri, Oct 8, 14:16

I don't think this really make sense. What happens to the previous proof?

src/avalanche/peermanager.cpp
154

Why?

deadalnix requested changes to this revision.Tue, Oct 12, 11:15
This revision now requires changes to proceed.Tue, Oct 12, 11:15
Fabien requested review of this revision.Tue, Oct 12, 12:15

This function is intended to be called after a vote on a conflicting proof has been finalized, and the conflicting proof accepted. Since this proof is the valid one, all the proofs with conflicting utxos need to be removed so we have no conflict in our pool. We don't keep the previous proofs since they are no longer relevant.
The function name is probably not the best, I spent some time trying to figure out how to call it and was never 100% satisfied, so I picked the best I came to; suggestions are welcome.

deadalnix requested changes to this revision.Tue, Oct 12, 12:29
deadalnix added inline comments.
src/avalanche/peermanager.cpp
154

This is still wrong, isn't it?

This revision now requires changes to proceed.Tue, Oct 12, 12:29