Page MenuHomePhabricator

[avalanche] Don't poll for proofs that have been evicted
AbandonedPublic

Authored by Fabien on Dec 6 2021, 12:21.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

If the proof no longer exists in the peer manager, then it has been evicted from both the pools and is no longer worth polling.

The addProofToReconcile() now returns a bool and the tests are updated accordingly. Cleaning up the actual queries to remove evicted proofs will be done in another diff.

Note to reviewers: I did make another IsWorthPolling function because:

  1. This would be a single line method, so very few to gain
  2. This needs access to the processors private members peer manager and its lock so needs to be a private method. For the blocks this is a static function so this creates confusion.

Ret T1854.

Test Plan
ninja all check-avalanche

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_isworthpolling_proof
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17542
Build 34910: Build Difflint-circular-dependencies · build-debug · build-without-wallet · build-clang · build-diff · build-clang-tidy
Build 34909: arc lint + arc unit