Browse Source

Fixed typos (#680)

Just a few nit-picky typo fixes.
pull/693/head
Christian Muehlhaeuser 5 years ago
committed by Raúl Kripalani
parent
commit
40cb489097
  1. 2
      defaults.go
  2. 2
      p2p/host/basic/basic_host_test.go
  3. 2
      p2p/net/mock/interface.go
  4. 2
      p2p/net/mock/mock_net.go
  5. 2
      p2p/protocol/identify/id.go
  6. 2
      p2p/protocol/identify/id_test.go
  7. 2
      p2p/test/backpressure/backpressure_test.go

2
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 {

2
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()

2
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

2
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]

2
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()

2
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

2
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()

Loading…
Cancel
Save