Skip to content

Commit

Permalink
fix: do not override known address after identify is done
Browse files Browse the repository at this point in the history
Identify protocol being executed it means that both peers are somehow connected. Hence, it should not override working multiaddresses but only add to it.

Fixes #1484
  • Loading branch information
fryorcraken committed Nov 21, 2022
1 parent 030dbc8 commit f11a039
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/identify/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export class IdentifyService implements Startable {

// LEGACY: Update peers data in PeerStore
try {
await this.components.peerStore.addressBook.set(id, listenAddrs.map((addr) => multiaddr(addr)))
await this.components.peerStore.addressBook.add(id, listenAddrs.map((addr) => multiaddr(addr)))
} catch (err: any) {
log.error('received invalid addrs', err)
}
Expand Down

0 comments on commit f11a039

Please sign in to comment.