diff --git a/defaults.go b/defaults.go index 18de400d..cdcd8288 100644 --- a/defaults.go +++ b/defaults.go @@ -125,7 +125,7 @@ var Defaults Option = func(cfg *Config) error { } // FallbackDefaults applies default options to the libp2p node if and only if no -// other relevent options have been applied. will be appended to the options +// other relevant options have been applied. will be appended to the options // passed into New. var FallbackDefaults Option = func(cfg *Config) error { for _, def := range defaults { diff --git a/p2p/host/basic/basic_host_test.go b/p2p/host/basic/basic_host_test.go index acc1db85..5e980f89 100644 --- a/p2p/host/basic/basic_host_test.go +++ b/p2p/host/basic/basic_host_test.go @@ -363,7 +363,7 @@ func TestProtoDowngrade(t *testing.T) { h1.Network().ConnsToPeer(h2.ID())[0].Close() - time.Sleep(time.Millisecond * 50) // allow notifications to propogate + time.Sleep(time.Millisecond * 50) // allow notifications to propagate h1.RemoveStreamHandler("/testing/1.0.0") h1.SetStreamHandler("/testing", func(s network.Stream) { connectedOn <- s.Protocol() diff --git a/p2p/net/mock/interface.go b/p2p/net/mock/interface.go index 57861bf1..16dcfcfe 100644 --- a/p2p/net/mock/interface.go +++ b/p2p/net/mock/interface.go @@ -51,7 +51,7 @@ type Mocknet interface { UnlinkNets(network.Network, network.Network) error // LinkDefaults are the default options that govern links - // if they do not have thier own option set. + // if they do not have their own option set. SetLinkDefaults(LinkOptions) LinkDefaults() LinkOptions diff --git a/p2p/net/mock/mock_net.go b/p2p/net/mock/mock_net.go index 832d7c25..5b75c399 100644 --- a/p2p/net/mock/mock_net.go +++ b/p2p/net/mock/mock_net.go @@ -286,7 +286,7 @@ func (mn *mocknet) UnlinkNets(n1, n2 network.Network) error { return mn.UnlinkPeers(n1.LocalPeer(), n2.LocalPeer()) } -// get from the links map. and lazily contruct. +// get from the links map. and lazily construct. func (mn *mocknet) linksMapGet(p1, p2 peer.ID) map[*link]struct{} { l1, found := mn.links[p1] diff --git a/p2p/protocol/identify/id.go b/p2p/protocol/identify/id.go index f44716b2..1cfffa57 100644 --- a/p2p/protocol/identify/id.go +++ b/p2p/protocol/identify/id.go @@ -475,7 +475,7 @@ func HasConsistentTransport(a ma.Multiaddr, green []ma.Multiaddr) bool { // IdentifyWait returns a channel which will be closed once // "ProtocolIdentify" (handshake3) finishes on given conn. // This happens async so the connection can start to be used -// even if handshake3 knowledge is not necesary. +// even if handshake3 knowledge is not necessary. // Users **MUST** call IdentifyWait _after_ IdentifyConn func (ids *IDService) IdentifyWait(c network.Conn) <-chan struct{} { ids.currmu.Lock() diff --git a/p2p/protocol/identify/id_test.go b/p2p/protocol/identify/id_test.go index 4bbf91b9..dedf9a09 100644 --- a/p2p/protocol/identify/id_test.go +++ b/p2p/protocol/identify/id_test.go @@ -160,7 +160,7 @@ func testHasPublicKey(t *testing.T, h host.Host, p peer.ID, shouldBe ic.PubKey) } // TestIDServiceWait gives the ID service 1s to finish after dialing -// this is becasue it used to be concurrent. Now, Dial wait till the +// this is because it used to be concurrent. Now, Dial wait till the // id service is done. func TestIDService(t *testing.T) { oldTTL := peerstore.RecentlyConnectedAddrTTL diff --git a/p2p/test/backpressure/backpressure_test.go b/p2p/test/backpressure/backpressure_test.go index 92c8f20b..e102f4d1 100644 --- a/p2p/test/backpressure/backpressure_test.go +++ b/p2p/test/backpressure/backpressure_test.go @@ -330,7 +330,7 @@ func TestStBackpressureStreamWrite(t *testing.T) { } roundsTime := time.Since(roundsStart) - // now read continously, while we measure stats. + // now read continuously, while we measure stats. stop := make(chan struct{}) contStart := time.Now()