This repository has been archived by the owner on Aug 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: delete addrs when "updating" them to zero
1. Fix expiration check to check "not before" instead of after. Otherwise, something that is expiring "now" won't count as expired. The datastore-backed peerstore already had the correct logic. 2. Short-circuit updating the TTL to 0 and just delete the records. Note: this wasn't causing problems on Linux (likely due to monotonic clocks?) but was causing go-libp2p tests to fail reliably on Windows.
- Loading branch information
Showing
2 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters