The randrange() method expects the range to be non zero.
In the peermanager_tests/select_peer_random case the max variable
can be 0 and fail the test. Since we still want to test slot 0, set slot = 0
when max == 0 without calling the randrange() method.
Details
Details
- Reviewers
PiRK - Group Reviewers
Restricted Project - Commits
- rABCb8f762ba7906: Fix a rare failure in the peermanager tests
ninja check-avalanche
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- fix_peermanager_tests_randrange
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 13958 Build 27924: Build Diff lint-circular-dependencies · build-without-wallet · build-diff · build-clang-tidy · build-debug · build-clang Build 27923: arc lint + arc unit
Event Timeline
Comment Actions
I updated the revision so that the last line does not start with a = because it was parsed as a very large title.