Skip to content

Fixing overflow of timepoints addition #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2025

Conversation

ErakhtinB
Copy link
Contributor

No description provided.

@kamilsa kamilsa requested a review from Copilot April 10, 2025 06:48
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/peer/address_repository/inmem_address_repository.cpp:69

  • [nitpick] Consider defining a named constant for the TTL threshold (std::chrono::milliseconds::max() / 2) to improve code readability and maintainability.
if (ttl >= std::chrono::milliseconds::max() / 2) {

src/peer/address_repository/inmem_address_repository.cpp:67

  • Please add unit tests to verify calculateExpirationTime behavior for both normal and edge-case TTL values.
Clock::time_point InmemAddressRepository::calculateExpirationTime(

@kamilsa kamilsa requested review from kamilsa and turuslan April 10, 2025 08:38
@ErakhtinB ErakhtinB force-pushed the fix/expires_at_overflow branch from 59bde8d to 28d6ec5 Compare April 10, 2025 09:50
@turuslan turuslan merged commit 9b98a1d into libp2p:master Apr 10, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants