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

fix multiple TTL bugs #92

Merged
merged 1 commit into from
Jul 25, 2019
Merged

fix multiple TTL bugs #92

merged 1 commit into from
Jul 25, 2019

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Jul 24, 2019

The first fix independently extends the address expiration time and the address TTL:

By example:

  • We have an address with a TTL of 4s that will expire in 1s.
  • We update it with a TTL of 3s.

Before this change:

  • We end up with an address with a TTL of 3s that will expire in 3s.

After this change:

  • We end up with an address with a TTL of 4s that will expire in 3s.

The second fix prevents the in-memory addressbook from announcing existing addresses every time their TTLs get updated.


The third fix correctly updates TTLs for existing addresses in the on-disk addressbook.

This fixes libp2p/go-libp2p-identify#2

@Stebalien Stebalien force-pushed the fix/identify-2 branch 2 times, most recently from 86be435 to 854f94b Compare July 24, 2019 23:47
The first fix independently extends the address expiration time and the address
TTL:

By example:

* We have an address with a TTL of 4s that will expire in 1s.
* We update it with a TTL of 3s.

Before this change:

* We end up with an address with a TTL of 3s that will expire in 3s.

After this change:

* We end up with an address with a TTL of 4s that will expire in 3s.

---

The second fix prevents the in-memory addressbook from announcing existing
addresses every time their TTLs get updated.

---

The third fix correctly updates TTLs for existing addresses in the on-disk
addressbook.

This fixes libp2p/go-libp2p-identify#2
Copy link
Contributor

@hsanjuan hsanjuan left a comment

Choose a reason for hiding this comment

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

Thanks

@Stebalien Stebalien merged commit f4c9af1 into master Jul 25, 2019
@Stebalien Stebalien deleted the fix/identify-2 branch July 25, 2019 16:42
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.

Identify overwrites peerstore addresses TTL
2 participants