Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaolou86 committed Oct 11, 2023
1 parent 45c797e commit 94d66e0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func TestAllPeersDoNotHaveBlock(t *testing.T) {
{[]peer.ID{p1}, []cid.Cid{c2}, []cid.Cid{}},
{[]peer.ID{p2}, []cid.Cid{c2}, []cid.Cid{c2}},

// p0 recieved DONT_HAVE for c1 & c2 (but not for c0)
// p0 received DONT_HAVE for c1 & c2 (but not for c0)
{[]peer.ID{p0}, []cid.Cid{c0, c1, c2}, []cid.Cid{c1, c2}},
{[]peer.ID{p0, p1}, []cid.Cid{c0, c1, c2}, []cid.Cid{}},
// Both p0 and p2 received DONT_HAVE for c2
Expand Down
2 changes: 1 addition & 1 deletion bitswap/client/internal/getter/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type GetBlocksFunc func(context.Context, []cid.Cid) (<-chan blocks.Block, error)

// SyncGetBlock takes a block cid and an async function for getting several
// blocks that returns a channel, and uses that function to return the
// block syncronously.
// block synchronously.
func SyncGetBlock(p context.Context, k cid.Cid, gb GetBlocksFunc) (blocks.Block, error) {
p, span := internal.StartSpan(p, "Getter.SyncGetBlock")
defer span.End()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func TestRateLimitingRequests(t *testing.T) {
defer fpn.queriesMadeMutex.Unlock()
if fpn.queriesMade != maxInProcessRequests+1 {
t.Logf("Queries made: %d\n", fpn.queriesMade)
t.Fatal("Did not make all seperate requests")
t.Fatal("Did not make all separate requests")
}
}

Expand Down
4 changes: 2 additions & 2 deletions bitswap/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ var (
)

func DupHist(ctx context.Context) metrics.Histogram {
return metrics.NewCtx(ctx, "recv_dup_blocks_bytes", "Summary of duplicate data blocks recived").Histogram(metricsBuckets)
return metrics.NewCtx(ctx, "recv_dup_blocks_bytes", "Summary of duplicate data blocks received").Histogram(metricsBuckets)
}

func AllHist(ctx context.Context) metrics.Histogram {
return metrics.NewCtx(ctx, "recv_all_blocks_bytes", "Summary of all data blocks recived").Histogram(metricsBuckets)
return metrics.NewCtx(ctx, "recv_all_blocks_bytes", "Summary of all data blocks received").Histogram(metricsBuckets)
}

func SentHist(ctx context.Context) metrics.Histogram {
Expand Down
2 changes: 1 addition & 1 deletion bitswap/server/internal/decision/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestConsistentAccounting(t *testing.T) {
t.Fatal("Inconsistent book-keeping. Strategies don't agree")
}

// Ensure sender didn't record receving anything. And that the receiver
// Ensure sender didn't record receiving anything. And that the receiver
// didn't record sending anything
if receiver.Engine.numBytesSentTo(sender.Peer) != 0 || sender.Engine.numBytesReceivedFrom(receiver.Peer) != 0 {
t.Fatal("Bert didn't send bytes to Ernie")
Expand Down

0 comments on commit 94d66e0

Please sign in to comment.