Skip to content

Commit d76a43f

Browse files
authored
chore: fix typos (#2689)
1 parent e33f4c4 commit d76a43f

File tree

12 files changed

+15
-15
lines changed

12 files changed

+15
-15
lines changed

core/crypto/ecdsa_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func TestECDSABasicSignAndVerify(t *testing.T) {
2525
}
2626

2727
if !ok {
28-
t.Fatal("signature didnt match")
28+
t.Fatal("signature didn't match")
2929
}
3030

3131
// change data

core/crypto/rsa_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestRSABasicSignAndVerify(t *testing.T) {
2424
}
2525

2626
if !ok {
27-
t.Fatal("signature didnt match")
27+
t.Fatal("signature didn't match")
2828
}
2929

3030
// change data

core/crypto/secp256k1_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestSecp256k1BasicSignAndVerify(t *testing.T) {
2424
}
2525

2626
if !ok {
27-
t.Fatal("signature didnt match")
27+
t.Fatal("signature didn't match")
2828
}
2929

3030
// change data

core/routing/routing.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type Routing interface {
7676
ValueStore
7777

7878
// Bootstrap allows callers to hint to the routing system to get into a
79-
// Boostrapped state and remain there. It is not a synchronous call.
79+
// Bootstrapped state and remain there. It is not a synchronous call.
8080
Bootstrap(context.Context) error
8181

8282
// TODO expose io.Closer or plain-old Close error

examples/multipro/pb/p2p.pb.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/multipro/pb/p2p.proto

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ message MessageData {
1616

1717
//// ping protocol
1818

19-
// a protocol define a set of reuqest and responses
19+
// A protocol defines a set of requests and responses.
2020
message PingRequest {
2121
MessageData messageData = 1;
2222

@@ -36,7 +36,7 @@ message PingResponse {
3636

3737
//// echo protocol
3838

39-
// a protocol define a set of reuqest and responses
39+
// A protocol defines a set of requests and responses.
4040
message EchoRequest {
4141
MessageData messageData = 1;
4242

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 occurred slower than expected")
192+
}, dur*5/2, 10*time.Millisecond, "reset of rate limiter occurred slower than expected")
193193
}
194194

195195
func TestAutoNATServiceStartup(t *testing.T) {

p2p/host/autorelay/metrics.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var (
5959
prometheus.CounterOpts{
6060
Namespace: metricNamespace,
6161
Name: "candidates_circuit_v2_support_total",
62-
Help: "Candidiates supporting circuit v2",
62+
Help: "Candidates supporting circuit v2",
6363
},
6464
[]string{"support"},
6565
)
@@ -167,7 +167,7 @@ func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer {
167167
metricshelper.RegisterCollectors(setting.reg, collectors...)
168168

169169
// Initialise these counters to 0 otherwise the first reservation requests aren't handled
170-
// correctly when using promql increse function
170+
// correctly when using promql increase function
171171
reservationRequestsOutcomeTotal.WithLabelValues("refresh", "success")
172172
reservationRequestsOutcomeTotal.WithLabelValues("new", "success")
173173
candidatesCircuitV2SupportTotal.WithLabelValues("yes")

p2p/host/autorelay/relay_finder.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type relayFinder struct {
6363
candidates map[peer.ID]*candidate
6464
backoff map[peer.ID]time.Time
6565
maybeConnectToRelayTrigger chan struct{} // cap: 1
66-
// Any time _something_ hapens that might cause us to need new candidates.
66+
// Any time _something_ happens that might cause us to need new candidates.
6767
// This could be
6868
// * the disconnection of a relay
6969
// * the failed attempt to obtain a reservation with a current candidate

p2p/host/basic/natmgr.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (nmgr *natManager) background(ctx context.Context) {
127127
for {
128128
select {
129129
case <-nmgr.syncFlag:
130-
nmgr.doSync() // sync when our listen addresses chnage.
130+
nmgr.doSync() // sync when our listen addresses change.
131131
case <-ctx.Done():
132132
return
133133
}

p2p/security/tls/transport.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (t *Transport) SecureOutbound(ctx context.Context, insecure net.Conn, p pee
113113
for _, muxer := range t.muxers {
114114
muxers = append(muxers, (string)(muxer))
115115
}
116-
// Prepend the prefered muxers list to TLS config.
116+
// Prepend the preferred muxers list to TLS config.
117117
config.NextProtos = append(muxers, config.NextProtos...)
118118
cs, err := t.handshake(ctx, tls.Client(insecure, config), keyCh)
119119
if err != nil {

p2p/test/security/bench_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func benchmarkHandshakes(b *testing.B, factory Factory) {
7979

8080
pipes := make(chan net.Conn, 1)
8181

82-
var finished sync.Mutex // wait until all data has been transfered
82+
var finished sync.Mutex // wait until all data has been transferred
8383
finished.Lock()
8484
go func() {
8585
defer finished.Unlock()

0 commit comments

Comments
 (0)