Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore: fixing minor typos #1018

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion amino/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

const (
// ProtocolPrefix is the base prefix for Amono DHT protocols.
// ProtocolPrefix is the base prefix for Amino DHT protocols.
ProtocolPrefix protocol.ID = "/ipfs"

// ProtocolID is the latest protocol identifier for the Amino DHT.
Expand Down
4 changes: 2 additions & 2 deletions dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func makeDHT(h host.Host, cfg dhtcfg.Config) (*IpfsDHT, error) {
}

// construct routing table
// use twice the theoritical usefulness threhold to keep older peers around longer
// use twice the theoretical usefulness threshold to keep older peers around longer
rt, err := makeRoutingTable(dht, cfg, 2*maxLastSuccessfulOutboundThreshold)
if err != nil {
return nil, fmt.Errorf("failed to construct routing table,err=%s", err)
Expand Down Expand Up @@ -720,7 +720,7 @@ func (dht *IpfsDHT) validPeerFound(p peer.ID) {
}
}

// peerStoppedDHT signals the routing table that a peer is unable to responsd to DHT queries anymore.
// peerStoppedDHT signals the routing table that a peer is unable to respond to DHT queries anymore.
func (dht *IpfsDHT) peerStoppedDHT(p peer.ID) {
logger.Debugw("peer stopped dht", "peer", p)
// A peer that does not support the DHT protocol is dead for us.
Expand Down
4 changes: 2 additions & 2 deletions dual/dual.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
const tracer = tracing.Tracer("go-libp2p-kad-dht/dual")
const dualName = "Dual"

// DHT implements the routing interface to provide two concrete DHT implementationts for use
// DHT implements the routing interface to provide two concrete DHT implementations for use
// in IPFS that are used to support both global network users and disjoint LAN usecases.
type DHT struct {
WAN *dht.IpfsDHT
Expand Down Expand Up @@ -99,7 +99,7 @@ func DHTOption(opts ...dht.Option) Option {
// IpfsDHT internal constructions, modulo additional options used by the Dual DHT to enforce
// the LAN-vs-WAN distinction.
// Note: query or routing table functional options provided as arguments to this function
// will be overriden by this constructor.
// will be overridden by this constructor.
func New(ctx context.Context, h host.Host, options ...Option) (*DHT, error) {
var cfg config
err := cfg.apply(
Expand Down
2 changes: 1 addition & 1 deletion handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.M
}

// We run the addrs filter after checking for the length,
// this allows transient nodes with varying /p2p-circuit addresses to still have their anouncement go through.
// this allows transient nodes with varying /p2p-circuit addresses to still have their announcement go through.
addrs := dht.filterAddrs(pi.Addrs)
dht.providerStore.AddProvider(ctx, key, peer.AddrInfo{ID: pi.ID, Addrs: addrs})
}
Expand Down
2 changes: 1 addition & 1 deletion rt_diversity_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestRTPeerDiversityFilter(t *testing.T) {
require.True(t, r.Allow(g2))
r.Increment(g2)

// and then it dosen't work again
// and then it doesn't work again
require.False(t, r.Allow(g2))
}

Expand Down