Skip to content

Commit

Permalink
feat: plumb contexts through from peerstore (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
guseggert committed Nov 9, 2021
1 parent e18a6bf commit 8707662
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion p2p/net/swarm/testing/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ func GenSwarm(t *testing.T, opts ...Option) *swarm.Swarm {
p.Addr = tnet.ZeroLocalTCPAddress
}

ps := pstoremem.NewPeerstore()
ps, err := pstoremem.NewPeerstore()
require.NoError(t, err)
ps.AddPubKey(p.ID, p.PubKey)
ps.AddPrivKey(p.ID, p.PrivKey)
t.Cleanup(func() { ps.Close() })
Expand Down

0 comments on commit 8707662

Please sign in to comment.