Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

fix: delete addrs when "updating" them to zero #157

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

Stebalien
Copy link
Member

  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.

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.
@Stebalien
Copy link
Member Author

Ok, so... the libp2p PR aut-merged. So I'm going to merge this assuming it's probably "fine", merge, and update go-libp2p.

@Stebalien Stebalien merged commit b4ad10c into master Apr 30, 2021
@Stebalien Stebalien mentioned this pull request May 11, 2021
27 tasks
@aschmahmann aschmahmann mentioned this pull request May 14, 2021
71 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant