Skip to content

Commit

Permalink
add provider record addresses to peerstore
Browse files Browse the repository at this point in the history
fixes issue #868

(cherry picked from commit 777160f)
  • Loading branch information
dennis-tra authored and Jorropo committed Sep 18, 2023
1 parent f0c3b34 commit 406ba15
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/libp2p/go-libp2p-kad-dht/internal"
pb "github.com/libp2p/go-libp2p-kad-dht/pb"
recpb "github.com/libp2p/go-libp2p-record/pb"
"github.com/multiformats/go-base32"
)

// dhthandler specifies the signature of functions that handle DHT messages.
Expand Down Expand Up @@ -359,7 +358,7 @@ func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.M
continue
}

dht.providerStore.AddProvider(ctx, key, peer.AddrInfo{ID: p})
dht.providerStore.AddProvider(ctx, key, peer.AddrInfo{ID: pi.ID, Addrs: pi.Addrs})
}

return nil, nil
Expand Down

0 comments on commit 406ba15

Please sign in to comment.