Skip to content

Commit

Permalink
fix: set expires on observed address (#2935)
Browse files Browse the repository at this point in the history
Without this we continually re-validate observed addresses which
causes a lot of unecessary network activity.
  • Loading branch information
achingbrain authored Feb 4, 2025
1 parent d708bb6 commit d61cbac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/libp2p/src/address-manager/observed-addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export class ObservedAddresses {
}
const startingConfidence = metadata.verified
metadata.verified = true
metadata.expires = Date.now() + ttl
metadata.lastVerified = Date.now()

this.log('marking observed address %a as verified', addrString)
Expand Down

0 comments on commit d61cbac

Please sign in to comment.