From 2a795c14f45ca0c7e4b0ac8b8c3d104aaf8eabbb Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 29 Aug 2025 08:54:23 +0800 Subject: [PATCH] all: fix problematic function name in comment (#32513) Fix problematic function name in comment. Do my best to correct them all with a script to avoid spamming PRs. --- beacon/light/request/scheduler.go | 2 +- core/filtermaps/indexer.go | 4 ++-- core/state/reader.go | 2 +- core/verkle_witness_test.go | 2 +- core/vm/program/program.go | 2 +- crypto/kzg4844/kzg4844_ckzg_cgo.go | 2 +- crypto/kzg4844/kzg4844_gokzg.go | 2 +- eth/handler.go | 2 +- p2p/enode/iter.go | 2 +- triedb/pathdb/iterator.go | 2 +- triedb/pathdb/states.go | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/beacon/light/request/scheduler.go b/beacon/light/request/scheduler.go index e80daf805e..242ed56d28 100644 --- a/beacon/light/request/scheduler.go +++ b/beacon/light/request/scheduler.go @@ -269,7 +269,7 @@ func (s *Scheduler) addEvent(event Event) { s.Trigger() } -// filterEvent sorts each Event either as a request event or a server event, +// filterEvents sorts each Event either as a request event or a server event, // depending on its type. Request events are also sorted in a map based on the // module that originally initiated the request. It also ensures that no events // related to a server are returned before EvRegistered or after EvUnregistered. diff --git a/core/filtermaps/indexer.go b/core/filtermaps/indexer.go index 3571f9f375..ca50fb466c 100644 --- a/core/filtermaps/indexer.go +++ b/core/filtermaps/indexer.go @@ -30,7 +30,7 @@ const ( headLogDelay = time.Second // head indexing log info delay (do not log if finished faster) ) -// updateLoop initializes and updates the log index structure according to the +// indexerLoop initializes and updates the log index structure according to the // current targetView. func (f *FilterMaps) indexerLoop() { defer f.closeWg.Done() @@ -221,7 +221,7 @@ func (f *FilterMaps) processSingleEvent(blocking bool) bool { return true } -// setTargetView updates the target chain view of the iterator. +// setTarget updates the target chain view of the iterator. func (f *FilterMaps) setTarget(target targetUpdate) { f.targetView = target.targetView f.historyCutoff = target.historyCutoff diff --git a/core/state/reader.go b/core/state/reader.go index 4b854fefcc..3e8b31b6be 100644 --- a/core/state/reader.go +++ b/core/state/reader.go @@ -232,7 +232,7 @@ type trieReader struct { lock sync.Mutex // Lock for protecting concurrent read } -// trieReader constructs a trie reader of the specific state. An error will be +// newTrieReader constructs a trie reader of the specific state. An error will be // returned if the associated trie specified by root is not existent. func newTrieReader(root common.Hash, db *triedb.Database, cache *utils.PointCache) (*trieReader, error) { var ( diff --git a/core/verkle_witness_test.go b/core/verkle_witness_test.go index e200bf7f50..ed85d1555f 100644 --- a/core/verkle_witness_test.go +++ b/core/verkle_witness_test.go @@ -787,7 +787,7 @@ func TestProcessVerkleSelfDestructInSeparateTx(t *testing.T) { } } -// TestProcessVerkleSelfDestructInSeparateTx controls the contents of the witness after +// TestProcessVerkleSelfDestructInSameTx controls the contents of the witness after // a eip6780-compliant selfdestruct occurs. func TestProcessVerkleSelfDestructInSameTx(t *testing.T) { // The test txs were taken from a secondary testnet with chain id 69421 diff --git a/core/vm/program/program.go b/core/vm/program/program.go index 5b9cfdcc5f..72cf6ff845 100644 --- a/core/vm/program/program.go +++ b/core/vm/program/program.go @@ -53,7 +53,7 @@ func (p *Program) add(op byte) *Program { return p } -// pushBig creates a PUSHX instruction and pushes the given val. +// doPush creates a PUSHX instruction and pushes the given val. // - If the val is nil, it pushes zero // - If the val is bigger than 32 bytes, it panics func (p *Program) doPush(val *uint256.Int) { diff --git a/crypto/kzg4844/kzg4844_ckzg_cgo.go b/crypto/kzg4844/kzg4844_ckzg_cgo.go index b215b19928..46509674b6 100644 --- a/crypto/kzg4844/kzg4844_ckzg_cgo.go +++ b/crypto/kzg4844/kzg4844_ckzg_cgo.go @@ -150,7 +150,7 @@ func ckzgComputeCellProofs(blob *Blob) ([]Proof, error) { return p, nil } -// ckzgVerifyCellProofs verifies that the blob data corresponds to the provided commitment. +// ckzgVerifyCellProofBatch verifies that the blob data corresponds to the provided commitment. func ckzgVerifyCellProofBatch(blobs []Blob, commitments []Commitment, cellProofs []Proof) error { ckzgIniter.Do(ckzgInit) var ( diff --git a/crypto/kzg4844/kzg4844_gokzg.go b/crypto/kzg4844/kzg4844_gokzg.go index 82ec8379d4..e9676ff1b8 100644 --- a/crypto/kzg4844/kzg4844_gokzg.go +++ b/crypto/kzg4844/kzg4844_gokzg.go @@ -115,7 +115,7 @@ func gokzgComputeCellProofs(blob *Blob) ([]Proof, error) { return p, nil } -// gokzgVerifyCellProofs verifies that the blob data corresponds to the provided commitment. +// gokzgVerifyCellProofBatch verifies that the blob data corresponds to the provided commitment. func gokzgVerifyCellProofBatch(blobs []Blob, commitments []Commitment, cellProofs []Proof) error { gokzgIniter.Do(gokzgInit) diff --git a/eth/handler.go b/eth/handler.go index 32d1bb6935..304560a158 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -579,7 +579,7 @@ func newBlockRangeState(chain *core.BlockChain, typeMux *event.TypeMux) *blockRa return st } -// blockRangeBroadcastLoop announces changes in locally-available block range to peers. +// blockRangeLoop announces changes in locally-available block range to peers. // The range to announce is the range that is available in the store, so it's not just // about imported blocks. func (h *handler) blockRangeLoop(st *blockRangeState) { diff --git a/p2p/enode/iter.go b/p2p/enode/iter.go index f8f79a9436..4890321f49 100644 --- a/p2p/enode/iter.go +++ b/p2p/enode/iter.go @@ -38,7 +38,7 @@ type SourceIterator interface { NodeSource() string // source of current node } -// WithSource attaches a 'source name' to an iterator. +// WithSourceName attaches a 'source name' to an iterator. func WithSourceName(name string, it Iterator) SourceIterator { return sourceIter{it, name} } diff --git a/triedb/pathdb/iterator.go b/triedb/pathdb/iterator.go index 84ea08ddd3..8ca8247206 100644 --- a/triedb/pathdb/iterator.go +++ b/triedb/pathdb/iterator.go @@ -309,7 +309,7 @@ type diskStorageIterator struct { it ethdb.Iterator } -// StorageIterator creates a storage iterator over the persistent state. +// newDiskStorageIterator creates a storage iterator over the persistent state. func newDiskStorageIterator(db ethdb.KeyValueStore, account common.Hash, seek common.Hash) StorageIterator { pos := common.TrimRightZeroes(seek[:]) return &diskStorageIterator{ diff --git a/triedb/pathdb/states.go b/triedb/pathdb/states.go index bc638a569e..dc737c3b53 100644 --- a/triedb/pathdb/states.go +++ b/triedb/pathdb/states.go @@ -181,7 +181,7 @@ func (s *stateSet) accountList() []common.Hash { return list } -// StorageList returns a sorted list of all storage slot hashes in this state set +// storageList returns a sorted list of all storage slot hashes in this state set // for the given account. The returned list will include the hash of deleted // storage slot. //