Skip to content

Commit

Permalink
all: fix function names in docs (#29128)
Browse files Browse the repository at this point in the history
Signed-off-by: cui fliter <[email protected]>
  • Loading branch information
cuishuang authored Feb 29, 2024
1 parent 1883438 commit dbc27a1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion eth/peerset.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (ps *peerSet) registerSnapExtension(peer *snap.Peer) error {
return nil
}

// waitExtensions blocks until all satellite protocols are connected and tracked
// waitSnapExtension blocks until all satellite protocols are connected and tracked
// by the peerset.
func (ps *peerSet) waitSnapExtension(peer *eth.Peer) (*snap.Peer, error) {
// If the peer does not support a compatible `snap`, don't wait
Expand Down
2 changes: 1 addition & 1 deletion eth/protocols/eth/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (p *Peer) dispatchRequest(req *Request) error {
}
}

// dispatchRequest fulfils a pending request and delivers it to the requested
// dispatchResponse fulfils a pending request and delivers it to the requested
// sink.
func (p *Peer) dispatchResponse(res *Response, metadata func() interface{}) error {
resOp := &response{
Expand Down
2 changes: 1 addition & 1 deletion internal/era/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Iterator struct {
inner *RawIterator
}

// NewRawIterator returns a new Iterator instance. Next must be immediately
// NewIterator returns a new Iterator instance. Next must be immediately
// called on new iterators to load the first item.
func NewIterator(e *Era) (*Iterator, error) {
inner, err := NewRawIterator(e)
Expand Down
2 changes: 1 addition & 1 deletion metrics/sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (NilSample) Clear() {}
func (NilSample) Snapshot() SampleSnapshot { return (*emptySnapshot)(nil) }
func (NilSample) Update(v int64) {}

// SamplePercentiles returns an arbitrary percentile of the slice of int64.
// SamplePercentile returns an arbitrary percentile of the slice of int64.
func SamplePercentile(values []int64, p float64) float64 {
return CalculatePercentiles(values, []float64{p})[0]
}
Expand Down
4 changes: 2 additions & 2 deletions p2p/enode/nodedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func OpenDB(path string) (*DB, error) {
return newPersistentDB(path)
}

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

// newPersistentNodeDB creates/opens a leveldb backed persistent node database,
// newPersistentDB creates/opens a leveldb backed persistent node database,
// also flushing its contents in case of a version mismatch.
func newPersistentDB(path string) (*DB, error) {
opts := &opt.Options{OpenFilesCacheCapacity: 5}
Expand Down
2 changes: 1 addition & 1 deletion rpc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func (h *handler) addRequestOp(op *requestOp) {
}
}

// removeRequestOps stops waiting for the given request IDs.
// removeRequestOp stops waiting for the given request IDs.
func (h *handler) removeRequestOp(op *requestOp) {
for _, id := range op.ids {
delete(h.respWait, string(id))
Expand Down
2 changes: 1 addition & 1 deletion signer/core/signed_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func fromHex(data any) ([]byte, error) {
return nil, fmt.Errorf("wrong type %T", data)
}

// typeDataRequest tries to convert the data into a SignDataRequest.
// typedDataRequest tries to convert the data into a SignDataRequest.
func typedDataRequest(data any) (*SignDataRequest, error) {
var typedData apitypes.TypedData
if td, ok := data.(apitypes.TypedData); ok {
Expand Down

0 comments on commit dbc27a1

Please sign in to comment.