Skip to content

Commit

Permalink
fix racy peerinfo check
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Aug 15, 2024
1 parent 280558d commit ce9b9f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions floodsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ func checkMessageRouting(t *testing.T, topic string, pubs []*PubSub, subs []*Sub
}

func connect(t *testing.T, a, b host.Host) {
pinfo := a.Peerstore().PeerInfo(a.ID())
err := b.Connect(context.Background(), pinfo)
err := b.Connect(context.Background(), peer.AddrInfo{ID: a.ID(), Addrs: a.Addrs()})
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit ce9b9f6

Please sign in to comment.