Continues work on T355. Depends on D1534.
Details
Details
- Reviewers
deadalnix schancel - Group Reviewers
Restricted Project - Commits
- rSTAGING6254c7fdd6ec: Added a block index test for received time
rABC6254c7fdd6ec: Added a block index test for received time
make check
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/test/blockindex_tests.cpp | ||
---|---|---|
102 ↗ | (On Diff #4196) | Should the llabs be in there ? I see a potential pitfall using it because abs will simply truncate. Corollary: this needs to test ranges that do not fit on 32 bits. |
src/test/blockindex_tests.cpp | ||
---|---|---|
102 ↗ | (On Diff #4196) | The llabs() call is in validation.cpp, wrapping the call to GetReceivedTimeDiff(). The intent of this was to allow it to be used to compare which block came first (if necessary). For that reason, it's not included in the test. Do you have an opinion on the diff always being a positive value? Also, I've fixed the test to check greater-than-32-bit values. |
src/test/blockindex_tests.cpp | ||
---|---|---|
102 ↗ | (On Diff #4216) | This is likely testing nothing because of overflow. |
src/test/blockindex_tests.cpp | ||
---|---|---|
102 ↗ | (On Diff #4216) | Good catch. |
src/test/blockindex_tests.cpp | ||
---|---|---|
89 ↗ | (On Diff #4254) | std::numeric_limits<uint32_t>::max() |