1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 14:34:24 +08:00

peerstore Put -> Add

Changed lots of peer use, and changed the peerstore to ensure
there is only ever one peer in use.

Fixed #174
This commit is contained in:
Juan Batiz-Benet
2014-10-20 06:37:09 -07:00
parent 9ca87fbb93
commit ac62d13e42
11 changed files with 107 additions and 29 deletions

View File

@ -203,7 +203,7 @@ func TestNotFound(t *testing.T) {
local := peer.WithIDString("test_peer")
peerstore := peer.NewPeerstore()
peerstore.Put(local)
peerstore.Add(local)
d := NewDHT(ctx, local, peerstore, fn, fs, ds.NewMapDatastore())
@ -269,7 +269,7 @@ func TestLessThanKResponses(t *testing.T) {
fs := &fauxSender{}
local := peer.WithIDString("test_peer")
peerstore := peer.NewPeerstore()
peerstore.Put(local)
peerstore.Add(local)
d := NewDHT(ctx, local, peerstore, fn, fs, ds.NewMapDatastore())