mirror of
https://github.com/fluencelabs/go-libp2p-kad-dht
synced 2025-04-25 06:42:13 +00:00
Capitalized NOTE
, first letter of following word
License: MIT Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
This commit is contained in:
parent
8cd54dd9d8
commit
761f5c277e
2
dht.go
2
dht.go
@ -154,7 +154,7 @@ var errInvalidRecord = errors.New("received invalid record")
|
||||
|
||||
// getValueOrPeers queries a particular peer p for the value for
|
||||
// key. It returns either the value or a list of closer peers.
|
||||
// NOTE: it will update the dht's peerstore with any new addresses
|
||||
// NOTE: It will update the dht's peerstore with any new addresses
|
||||
// it finds for the given peer.
|
||||
func (dht *IpfsDHT) getValueOrPeers(ctx context.Context, p peer.ID,
|
||||
key key.Key) (*pb.Record, []peer.PeerInfo, error) {
|
||||
|
@ -127,7 +127,7 @@ func (dht *IpfsDHT) checkLocalDatastore(k key.Key) (*pb.Record, error) {
|
||||
recordIsBad = true
|
||||
}
|
||||
|
||||
// NOTE: we do not verify the record here beyond checking these timestamps.
|
||||
// NOTE: We do not verify the record here beyond checking these timestamps.
|
||||
// we put the burden of checking the records on the requester as checking a record
|
||||
// may be computationally expensive
|
||||
|
||||
|
@ -283,7 +283,7 @@ func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key key.Key,
|
||||
ps := pset.NewLimited(count)
|
||||
provs := dht.providers.GetProviders(ctx, key)
|
||||
for _, p := range provs {
|
||||
// NOTE: assuming that this list of peers is unique
|
||||
// NOTE: Assuming that this list of peers is unique
|
||||
if ps.TryAdd(p) {
|
||||
select {
|
||||
case peerOut <- dht.peerstore.PeerInfo(p):
|
||||
|
Loading…
x
Reference in New Issue
Block a user