Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0fde935

Browse files
shuoer86sukunrt
authored andcommittedNov 11, 2023
Fix typos
1 parent 1d84b7d commit 0fde935

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed
 

‎examples/echo/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The `makeBasicHost()` function creates a [go-libp2p-basichost](https://godoc.org
4242

4343
In order to create the swarm (and a `basichost`), the example needs:
4444

45-
- An [ipfs-procotol ID](https://godoc.org/github.com/libp2p/go-libp2p-peer#ID) like `QmNtX1cvrm2K6mQmMEaMxAuB4rTexhd87vpYVot4sEZzxc`. The example autogenerates a key pair on every run and uses an ID extracted from the public key (the hash of the public key). When using `-insecure`, it leaves the connection unencrypted (otherwise, it uses the key pair to encrypt communications).
45+
- An [ipfs-protocol ID](https://godoc.org/github.com/libp2p/go-libp2p-peer#ID) like `QmNtX1cvrm2K6mQmMEaMxAuB4rTexhd87vpYVot4sEZzxc`. The example autogenerates a key pair on every run and uses an ID extracted from the public key (the hash of the public key). When using `-insecure`, it leaves the connection unencrypted (otherwise, it uses the key pair to encrypt communications).
4646
- A [Multiaddress](https://godoc.org/github.com/multiformats/go-multiaddr), which indicates how to reach this peer. There can be several of them (using different protocols or locations for example). Example: `/ip4/127.0.0.1/tcp/1234`.
4747
- A [go-libp2p-peerstore](https://godoc.org/github.com/libp2p/go-libp2p-peerstore), which is used as an address book which matches node IDs to the multiaddresses through which they can be contacted. This peerstore gets autopopulated when manually opening a connection (with [`Connect()`](https://godoc.org/github.com/libp2p/go-libp2p/p2p/host/basic#BasicHost.Connect). Alternatively, we can manually [`AddAddr()`](https://godoc.org/github.com/libp2p/go-libp2p-peerstore#AddrManager.AddAddr) as in the example.
4848

‎examples/relay/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func run() {
2727
unreachable1, err := libp2p.New(
2828
libp2p.NoListenAddrs,
2929
// Usually EnableRelay() is not required as it is enabled by default
30-
// but NoListenAddrs overrides this, so we're adding it in explictly again.
30+
// but NoListenAddrs overrides this, so we're adding it in explicitly again.
3131
libp2p.EnableRelay(),
3232
)
3333
if err != nil {

‎p2p/host/autonat/svc_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func TestAutoNATServiceRateLimitJitter(t *testing.T) {
189189
svc.mx.Lock()
190190
defer svc.mx.Unlock()
191191
return svc.globalReqs == 0
192-
}, dur*5/2, 10*time.Millisecond, "reset of rate limitter occured slower than expected")
192+
}, dur*5/2, 10*time.Millisecond, "reset of rate limitter occurred slower than expected")
193193
}
194194

195195
func TestAutoNATServiceStartup(t *testing.T) {

‎p2p/host/basic/basic_host.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ func (h *BasicHost) background() {
543543
h.updateLocalIpAddr()
544544
}
545545
// Request addresses anyways because, technically, address filters still apply.
546-
// The underlying AllAddrs call is effectivley a no-op.
546+
// The underlying AllAddrs call is effectively a no-op.
547547
curr := h.Addrs()
548548
emitAddrChange(curr, lastAddrs)
549549
lastAddrs = curr

‎p2p/net/swarm/dial_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ func TestDialSimultaneousJoin(t *testing.T) {
562562
return
563563
}
564564

565-
t.Logf("first dial succedded; conn: %+v", c)
565+
t.Logf("first dial succeeded; conn: %+v", c)
566566

567567
connch <- c
568568
errs <- nil
@@ -587,7 +587,7 @@ func TestDialSimultaneousJoin(t *testing.T) {
587587
return
588588
}
589589

590-
t.Logf("second dial succedded; conn: %+v", c)
590+
t.Logf("second dial succeeded; conn: %+v", c)
591591

592592
connch <- c
593593
errs <- nil
@@ -605,7 +605,7 @@ func TestDialSimultaneousJoin(t *testing.T) {
605605
return
606606
}
607607

608-
t.Logf("third dial succedded; conn: %+v", c)
608+
t.Logf("third dial succeeded; conn: %+v", c)
609609

610610
connch <- c
611611
errs <- nil

0 commit comments

Comments
 (0)
Please sign in to comment.