Page MenuHomePhabricator

[avalanche] Add an invalidation latch to contender cache
Needs ReviewPublic

Authored by roqqit on Thu, Jan 23, 17:51.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

The polling behavior is designed such that invalidated items should not be polled (IsWorthPolling should return false).
Stake contenders are unique in that a particular contenderId can be invalidated but the underlying contender does not fall
out of the contender set unless its proof becomes invalid, so we cannot simply remove the contenderId as a valid contender.

This patch adds an invalidation status bit that latches on when set so that invalidated contenders will no longer be polled.

Test Plan
ninja check-avalanche-stakecontendercache_tests

Diff Detail