Page MenuHomePhabricator

[avalanche] Simplify the updatedBlockTip handler
ClosedPublic

Authored by Fabien on Dec 21 2021, 09:24.

Details

Reviewers
tyler-smith
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC42afa7ecdae3: [avalanche] Simplify the updatedBlockTip handler
Summary

We can use the rejectProof facility for newly invalidated proofs. This avoids a duplicate and makes the code more readable. There is no change in behavior.

Ref T1854.

Depends on D10711.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Dec 21 2021, 09:24
Fabien planned changes to this revision.Dec 24 2021, 08:13
tyler-smith added a subscriber: tyler-smith.

The iterating over proofs instead of peers looks better, and the removal logic appears correctly deduplicated without change in behavior.

This revision is now accepted and ready to land.Jan 26 2022, 09:38