Skip to content

Commit dbc27a1

Browse files
authored
all: fix function names in docs (ethereum#29128)
Signed-off-by: cui fliter <imcusg@gmail.com>
1 parent 1883438 commit dbc27a1

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

eth/peerset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func (ps *peerSet) registerSnapExtension(peer *snap.Peer) error {
100100
return nil
101101
}
102102

103-
// waitExtensions blocks until all satellite protocols are connected and tracked
103+
// waitSnapExtension blocks until all satellite protocols are connected and tracked
104104
// by the peerset.
105105
func (ps *peerSet) waitSnapExtension(peer *eth.Peer) (*snap.Peer, error) {
106106
// If the peer does not support a compatible `snap`, don't wait

eth/protocols/eth/dispatcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (p *Peer) dispatchRequest(req *Request) error {
136136
}
137137
}
138138

139-
// dispatchRequest fulfils a pending request and delivers it to the requested
139+
// dispatchResponse fulfils a pending request and delivers it to the requested
140140
// sink.
141141
func (p *Peer) dispatchResponse(res *Response, metadata func() interface{}) error {
142142
resOp := &response{

internal/era/iterator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Iterator struct {
3030
inner *RawIterator
3131
}
3232

33-
// NewRawIterator returns a new Iterator instance. Next must be immediately
33+
// NewIterator returns a new Iterator instance. Next must be immediately
3434
// called on new iterators to load the first item.
3535
func NewIterator(e *Era) (*Iterator, error) {
3636
inner, err := NewRawIterator(e)

metrics/sample.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (NilSample) Clear() {}
148148
func (NilSample) Snapshot() SampleSnapshot { return (*emptySnapshot)(nil) }
149149
func (NilSample) Update(v int64) {}
150150

151-
// SamplePercentiles returns an arbitrary percentile of the slice of int64.
151+
// SamplePercentile returns an arbitrary percentile of the slice of int64.
152152
func SamplePercentile(values []int64, p float64) float64 {
153153
return CalculatePercentiles(values, []float64{p})[0]
154154
}

p2p/enode/nodedb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func OpenDB(path string) (*DB, error) {
8484
return newPersistentDB(path)
8585
}
8686

87-
// newMemoryNodeDB creates a new in-memory node database without a persistent backend.
87+
// newMemoryDB creates a new in-memory node database without a persistent backend.
8888
func newMemoryDB() (*DB, error) {
8989
db, err := leveldb.Open(storage.NewMemStorage(), nil)
9090
if err != nil {
@@ -93,7 +93,7 @@ func newMemoryDB() (*DB, error) {
9393
return &DB{lvl: db, quit: make(chan struct{})}, nil
9494
}
9595

96-
// newPersistentNodeDB creates/opens a leveldb backed persistent node database,
96+
// newPersistentDB creates/opens a leveldb backed persistent node database,
9797
// also flushing its contents in case of a version mismatch.
9898
func newPersistentDB(path string) (*DB, error) {
9999
opts := &opt.Options{OpenFilesCacheCapacity: 5}

rpc/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ func (h *handler) addRequestOp(op *requestOp) {
324324
}
325325
}
326326

327-
// removeRequestOps stops waiting for the given request IDs.
327+
// removeRequestOp stops waiting for the given request IDs.
328328
func (h *handler) removeRequestOp(op *requestOp) {
329329
for _, id := range op.ids {
330330
delete(h.respWait, string(id))

signer/core/signed_data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func fromHex(data any) ([]byte, error) {
260260
return nil, fmt.Errorf("wrong type %T", data)
261261
}
262262

263-
// typeDataRequest tries to convert the data into a SignDataRequest.
263+
// typedDataRequest tries to convert the data into a SignDataRequest.
264264
func typedDataRequest(data any) (*SignDataRequest, error) {
265265
var typedData apitypes.TypedData
266266
if td, ok := data.(apitypes.TypedData); ok {

0 commit comments

Comments
 (0)