Skip to content
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

Clear previous addrs from peerstore before adding new #127

Closed
gammazero opened this issue Sep 27, 2023 · 0 comments · Fixed by #128
Closed

Clear previous addrs from peerstore before adding new #127

gammazero opened this issue Sep 27, 2023 · 0 comments · Fixed by #128

Comments

@gammazero
Copy link
Collaborator

When a publisher's multiaddress changes, the new address(es) are added to the peerstore, and the old ones are left alone. Normally, the old addresses would expire after some time. If the polling period is within the temporary address TTL or there are frequent manual syncs, then this can keep resetting the old address expiration and prevent it from expiring.

The old addresses should be removed from the peerstore and only current/new addresses should be kept.

gammazero added a commit that referenced this issue Sep 27, 2023
Remove unused addrs from peerstore to prevent addresses that are no longer valid from continuing to be used.

Fixes #127

Update non-critical log messages to log at debug level.
gammazero added a commit that referenced this issue Sep 27, 2023
Remove unused addrs from peerstore to prevent addresses that are no longer valid from continuing to be used.

Fixes #127

Update non-critical log messages to log at debug level.
gammazero added a commit that referenced this issue Sep 27, 2023
* Remove unused addrs from peerstore

Remove unused addrs from peerstore to prevent addresses that are no longer valid from continuing to be used.

Fixes #127

Update non-critical log messages to log at debug level.

* Fix log message
* Add test to check that old address is removed from peerstore
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 a pull request may close this issue.

1 participant