all: fix function names in docs (#29128)
Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
parent
1883438964
commit
dbc27a199f
|
@ -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
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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]
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
@ -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}
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue