test: Clean up tests `gettime` is outdated
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- cpp
- Domain
- testing-qa
Research direction
Search the test suite for the outdated gettime test and inspect the _test_y2106 functional test mentioned in the issue. Confirm that the existing functional coverage makes the old check unnecessary, then remove or update the test as appropriate and run the affected tests.
Written by the indexing model from the issue text.
Description
Summary
The gettime test is outdated:
- It was originally added in Bitcoin Core to verify the time handling in the MinGW toolchain and detect 32-bit vs 64-bit mismatches. However, the code now relies on std::chrono::system_clock, making the original check unnecessary.
- Although
system_clockcould still return incorrect values, any such issue would likely affect all
-GetTime<>calls, not just those with second-level precision. Such errors would probably trigger signed integer overflows at nanosecond precision, which should either be caught by UBSan or by the assert(ret > 0s) check. If not, the issue would become obvious in the debug log at startup.
Notes
- For now, the test is can be removed. Alternatively, it could be expanded to cover time handling more comprehensively and updated alongside the block header timestamp logic.
- However, since that timestamp won’t exceed the year 2106, this is already covered by the
_test_y2106functional test.
- Dominant language
- C++
- Stars
- 29
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BitgesellOfficial/bitgesell
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
BitgesellOfficial/bitgesell#357 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
BitgesellOfficial/bitgesell#148 ·
-
good first issue
Difficulty 4/5 3-5 days Newbie friendliness 55/100
BitgesellOfficial/bitgesell#147 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
BitgesellOfficial/bitgesell#142 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 35/100
BitgesellOfficial/bitgesell#141 ·
All issues in BitgesellOfficial/bitgesell
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·