Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: fix typos #2608

Merged
merged 2 commits into from
Nov 18, 2023
Merged
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 examples/echo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The `makeBasicHost()` function creates a [go-libp2p-basichost](https://godoc.org

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

- 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).
- 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).
- 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`.
- 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.

Expand Down
2 changes: 1 addition & 1 deletion examples/relay/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func run() {
unreachable1, err := libp2p.New(
libp2p.NoListenAddrs,
// Usually EnableRelay() is not required as it is enabled by default
// but NoListenAddrs overrides this, so we're adding it in explictly again.
// but NoListenAddrs overrides this, so we're adding it in explicitly again.
libp2p.EnableRelay(),
)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion p2p/host/autonat/svc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func TestAutoNATServiceRateLimitJitter(t *testing.T) {
svc.mx.Lock()
defer svc.mx.Unlock()
return svc.globalReqs == 0
}, dur*5/2, 10*time.Millisecond, "reset of rate limitter occured slower than expected")
}, dur*5/2, 10*time.Millisecond, "reset of rate limitter occurred slower than expected")
}

func TestAutoNATServiceStartup(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion p2p/host/basic/basic_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ func (h *BasicHost) background() {
h.updateLocalIpAddr()
}
// Request addresses anyways because, technically, address filters still apply.
// The underlying AllAddrs call is effectivley a no-op.
// The underlying AllAddrs call is effectively a no-op.
curr := h.Addrs()
emitAddrChange(curr, lastAddrs)
lastAddrs = curr
Expand Down
6 changes: 3 additions & 3 deletions p2p/net/swarm/dial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ func TestDialSimultaneousJoin(t *testing.T) {
return
}

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

connch <- c
errs <- nil
Expand All @@ -587,7 +587,7 @@ func TestDialSimultaneousJoin(t *testing.T) {
return
}

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

connch <- c
errs <- nil
Expand All @@ -605,7 +605,7 @@ func TestDialSimultaneousJoin(t *testing.T) {
return
}

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

connch <- c
errs <- nil
Expand Down
Loading