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
Branch
avalanche_updatedtip_rejectproof
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17827
Build 35480: Build Difflint-circular-dependencies · build-diff · build-without-wallet · build-debug · build-clang-tidy · build-clang
Build 35479: arc lint + arc unit

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