The number of votes and polls are stored as unsigned ints for the computation, causing an overflow when 2 * votes - polls is negative. This can happen if a node never responded any poll, and cause the score to turn high instead of going negative. The test case was checking the score response against a rise then fall, so it didn't check for negative values and missed the edge case.
Details
Details
- Reviewers
deadalnix - Group Reviewers
Restricted Project - Commits
- rABCb590f6440265: Fix an unsigned issue in the availability score calculation
ninja all check
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable