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 30347 Build 60219: Build Diff build-without-wallet · build-debug · lint-circular-dependencies · build-clang-tidy · build-clang · build-diff Build 60218: arc lint + arc unit
Event Timeline
src/avalanche/stakecontendercache.cpp | ||
---|---|---|
27 | 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.