The stake contender cache needs a way to be cleaned up so that it does not grow unbounded. The intent is to call cleanup() when a block becomes newly finalized since there is no need to maintain the cache for finalized blocks.
Details
Details
- Reviewers
Fabien - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) Restricted Project - Commits
- rABC2f0cd61946ba: [avalanche] Implement cleanup for stake contender cache
ninja check-avalanche
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- sw-cleanup
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 30372 Build 60264: Build Diff lint-circular-dependencies · build-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang Build 60263: arc lint + arc unit
Event Timeline
src/avalanche/stakecontendercache.cpp | ||
---|---|---|
27 ↗ | (On Diff #49715) | I think you can make this more effective and not require cs_main by adding the block height to the cache. Manual winners could also be made a multi index to achieve the same |
Comment Actions
Use lower_bound instead since it is more technically correct and robust to future changes. There is no change in behavior.