This provides an easy way to determine all of the contenders that should be polled without introducing deduping logic in Processor to account for the local winner(s). getPollableContenders() will be used in a future patch to reconcile stake contenders.
Details
Details
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- get-pollable-contenders
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 31970 Build 63432: Build Diff build-without-wallet · lint-circular-dependencies · build-debug · build-diff · build-clang · build-clang-tidy Build 63431: arc lint + arc unit
Event Timeline
Comment Actions
Tail of the build log:
/work /work/abc-ci-builds/lint-circular-dependencies A new circular dependency in the form of "avalanche/processor -> avalanche/stakecontendercache -> avalanche/processor" appears to have been introduced. /work/abc-ci-builds/lint-circular-dependencies Build lint-circular-dependencies failed with exit code 1
This comment was removed by Fabien.
src/avalanche/stakecontendercache.cpp | ||
---|---|---|
180 ↗ | (On Diff #51999) | It's unlikely but the rank could be equal; you should handle the case or the comparison is not deterministic |
190 ↗ | (On Diff #51999) | I think you can make this more effective by taking the max number as a parameter. This can also help moving the assertion out of the processor. |
197 ↗ | (On Diff #51999) | You'd better directly return the size here imo |
Comment Actions
- Fix rare sorting case where two proofs have the same rank.
- Make num pollable a parameter so the processor will have control over how many contenders to poll for.
- Return number of contenders instead of bool.
- Fix test not actually checking the contender order.
Comment Actions
Cleanup unnecessary nesting when sorting contenders and make the sorting work the same as staking rewards selection.