Skip to content

Commit b3e0f70

Browse files
gballetgzliudan
authored andcommitted
eth/downloader: minor typo fixes in comments (ethereum#21035)
1 parent 0673fa1 commit b3e0f70

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

eth/downloader/downloader_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ func testBlockHeaderAttackerDropping(t *testing.T, protocol int) {
13471347
defer tester.terminate()
13481348

13491349
for i, tt := range tests {
1350-
// Register a new peer and ensure it's presence
1350+
// Register a new peer and ensure its presence
13511351
id := fmt.Sprintf("test %d", i)
13521352
if err := tester.newPeer(id, protocol, []common.Hash{tester.genesis.Hash()}, nil, nil, nil); err != nil {
13531353
t.Fatalf("test %d: failed to register new peer: %v", i, err)

eth/downloader/queue.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ func (q *queue) ShouldThrottleReceipts() bool {
235235
}
236236

237237
// resultSlots calculates the number of results slots available for requests
238-
// whilst adhering to both the item and the memory limit too of the results
239-
// cache.
238+
// whilst adhering to both the item and the memory limits of the result cache.
240239
func (q *queue) resultSlots(pendPool map[string]*fetchRequest, donePool map[common.Hash]struct{}) int {
241240
// Calculate the maximum length capped by the memory limit
242241
limit := len(q.resultCache)
@@ -349,7 +348,7 @@ func (q *queue) Schedule(headers []*types.Header, from uint64) []*types.Header {
349348
}
350349

351350
// Results retrieves and permanently removes a batch of fetch results from
352-
// the cache. the result slice will be empty if the queue has been closed.
351+
// the cache. The result slice will be empty if the queue has been closed.
353352
func (q *queue) Results(block bool) []*fetchResult {
354353
q.lock.Lock()
355354
defer q.lock.Unlock()

0 commit comments

Comments
 (0)