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 17877
Build 35580: Build Difflint-circular-dependencies · build-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang
Build 35579: 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