This makes the comparison consistent with arith_uint256 .
Details
Details
- Reviewers
schancel jasonbcox - Group Reviewers
Restricted Project - Commits
- rSTAGING7a5e1e55ec95: Modify uint256's comparison to use proper endianess
rABC7a5e1e55ec95: Modify uint256's comparison to use proper endianess
Updated unit tests.
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- uint256endian
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 2780 Build 3670: Bitcoin ABC Buildbot (legacy) Build 3669: arc lint + arc unit
Event Timeline
src/uint256.h | ||
---|---|---|
44 | These are big endian and this is to ensure they're compared from smallest to largest byte? |
src/test/uint256_tests.cpp | ||
---|---|---|
129 | What's the purpose of these bitshifts? |
src/uint256.h | ||
---|---|---|
43 | Can't this Compare() function take any size of base_blob? If so, this line will segfault if other is smaller than this. Maybe the first check should be if (sizeof(data) == sizeof(other.data)) { |
src/uint256.h | ||
---|---|---|
43 | base_blob is a template. it cannot be any size. |
src/uint256.h | ||
---|---|---|
44 | Oh right, the MSB should be compared first. Sorry. |