Skip to content

Commit b3d09ec

Browse files
AaronChen0jorgemmsilva
authored andcommitted
all: fix mismatched names in comments (ethereum#29348)
* all: fix mismatched names in comments * metrics: fix mismatched name in UpdateIfGt
1 parent 213a528 commit b3d09ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+61
-61
lines changed

accounts/abi/argument.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (arguments Arguments) Copy(v interface{}, values []interface{}) error {
127127
return arguments.copyAtomic(v, values[0])
128128
}
129129

130-
// unpackAtomic unpacks ( hexdata -> go ) a single value
130+
// copyAtomic copies ( hexdata -> go ) a single value
131131
func (arguments Arguments) copyAtomic(v interface{}, marshalledValues interface{}) error {
132132
dst := reflect.ValueOf(v).Elem()
133133
src := reflect.ValueOf(marshalledValues)

accounts/keystore/account_cache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var (
5151
}
5252
)
5353

54-
// waitWatcherStarts waits up to 1s for the keystore watcher to start.
54+
// waitWatcherStart waits up to 1s for the keystore watcher to start.
5555
func waitWatcherStart(ks *KeyStore) bool {
5656
// On systems where file watch is not supported, just return "ok".
5757
if !ks.cache.watcher.enabled() {

beacon/light/api/light_api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func decodeFinalityUpdate(enc []byte) (types.FinalityUpdate, error) {
289289
}, nil
290290
}
291291

292-
// GetHead fetches and validates the beacon header with the given blockRoot.
292+
// GetHeader fetches and validates the beacon header with the given blockRoot.
293293
// If blockRoot is null hash then the latest head header is fetched.
294294
func (api *BeaconLightApi) GetHeader(blockRoot common.Hash) (types.Header, error) {
295295
var blockId string

beacon/light/head_tracker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ func (h *HeadTracker) ValidatedHead() (types.SignedHeader, bool) {
5656
return h.signedHead, h.hasSignedHead
5757
}
5858

59-
// ValidatedHead returns the latest validated head.
59+
// ValidatedFinality returns the latest validated finality.
6060
func (h *HeadTracker) ValidatedFinality() (types.FinalityUpdate, bool) {
6161
h.lock.RLock()
6262
defer h.lock.RUnlock()
6363

6464
return h.finalityUpdate, h.hasFinalityUpdate
6565
}
6666

67-
// Validate validates the given signed head. If the head is successfully validated
67+
// ValidateHead validates the given signed head. If the head is successfully validated
6868
// and it is better than the old validated head (higher slot or same slot and more
6969
// signers) then ValidatedHead is updated. The boolean return flag signals if
7070
// ValidatedHead has been changed.

beacon/light/request/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func (s *serverWithTimeout) startTimeout(reqData RequestResponse) {
212212
})
213213
}
214214

215-
// stop stops all goroutines associated with the server.
215+
// unsubscribe stops all goroutines associated with the server.
216216
func (s *serverWithTimeout) unsubscribe() {
217217
s.lock.Lock()
218218
defer s.lock.Unlock()
@@ -337,7 +337,7 @@ func (s *serverWithLimits) sendRequest(request Request) (reqId ID) {
337337
return s.serverWithTimeout.sendRequest(request)
338338
}
339339

340-
// stop stops all goroutines associated with the server.
340+
// unsubscribe stops all goroutines associated with the server.
341341
func (s *serverWithLimits) unsubscribe() {
342342
s.lock.Lock()
343343
defer s.lock.Unlock()

beacon/light/sync/head_sync.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (s *HeadSync) newSignedHead(server request.Server, signedHead types.SignedH
101101
s.headTracker.ValidateHead(signedHead)
102102
}
103103

104-
// newSignedHead handles received signed head; either validates it if the chain
104+
// newFinalityUpdate handles received finality update; either validates it if the chain
105105
// is properly synced or stores it for further validation.
106106
func (s *HeadSync) newFinalityUpdate(server request.Server, finalityUpdate types.FinalityUpdate) {
107107
if !s.chainInit || types.SyncPeriod(finalityUpdate.SignatureSlot) > s.nextSyncPeriod {
@@ -111,7 +111,7 @@ func (s *HeadSync) newFinalityUpdate(server request.Server, finalityUpdate types
111111
s.headTracker.ValidateFinality(finalityUpdate)
112112
}
113113

114-
// processUnvalidatedHeads iterates the list of unvalidated heads and validates
114+
// processUnvalidated iterates the list of unvalidated heads and validates
115115
// those which can be validated.
116116
func (s *HeadSync) processUnvalidated() {
117117
if !s.chainInit {

beacon/types/exec_header.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type ExecutionHeader struct {
3636
obj headerObject
3737
}
3838

39-
// HeaderFromJSON decodes an execution header from JSON data provided by
39+
// ExecutionHeaderFromJSON decodes an execution header from JSON data provided by
4040
// the beacon chain API.
4141
func ExecutionHeaderFromJSON(forkName string, data []byte) (*ExecutionHeader, error) {
4242
var obj headerObject

cmd/geth/attach_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestAttachWithHeaders(t *testing.T) {
4848
// This is fixed in a follow-up PR.
4949
}
5050

51-
// TestAttachWithHeaders tests that 'geth db --remotedb' with custom headers works, i.e
51+
// TestRemoteDbWithHeaders tests that 'geth db --remotedb' with custom headers works, i.e
5252
// that custom headers are forwarded to the target.
5353
func TestRemoteDbWithHeaders(t *testing.T) {
5454
t.Parallel()

cmd/utils/export_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func testExport(t *testing.T, f string) {
9797
}
9898
}
9999

100-
// testDeletion tests if the deletion markers can be exported/imported correctly
100+
// TestDeletionExport tests if the deletion markers can be exported/imported correctly
101101
func TestDeletionExport(t *testing.T) {
102102
f := fmt.Sprintf("%v/tempdump", os.TempDir())
103103
defer func() {

common/lru/basiclru.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (l *list[T]) init() {
174174
l.root.prev = &l.root
175175
}
176176

177-
// push adds an element to the front of the list.
177+
// pushElem adds an element to the front of the list.
178178
func (l *list[T]) pushElem(e *listElem[T]) {
179179
e.prev = &l.root
180180
e.next = l.root.next

0 commit comments

Comments
 (0)