Skip to content

Commit 0a51028

Browse files
authored
all: fix various typos (#29542)
* core/rawdb: fix typos * accounts/abi: fix typos * metrics: fix typo * beacon: fix typo * crypto: fix typo * rpc: fix typo * rpc: fix typo
1 parent 5ffd940 commit 0a51028

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

accounts/abi/reflect.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"strings"
2525
)
2626

27-
// ConvertType converts an interface of a runtime type into a interface of the
27+
// ConvertType converts an interface of a runtime type into an interface of the
2828
// given type, e.g. turn this code:
2929
//
3030
// var fields []reflect.StructField
@@ -33,7 +33,7 @@ import (
3333
// Name: "X",
3434
// Type: reflect.TypeOf(new(big.Int)),
3535
// Tag: reflect.StructTag("json:\"" + "x" + "\""),
36-
// }
36+
// })
3737
//
3838
// into:
3939
//

beacon/light/request/scheduler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type Requester interface {
6565
// allow new operations.
6666
type Scheduler struct {
6767
lock sync.Mutex
68-
modules []Module // first has highest priority
68+
modules []Module // first has the highest priority
6969
names map[Module]string
7070
servers map[server]struct{}
7171
targets map[targetData]uint64

core/rawdb/accessors_snapshot.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,20 +92,20 @@ func DeleteAccountSnapshot(db ethdb.KeyValueWriter, hash common.Hash) {
9292
}
9393
}
9494

95-
// ReadStorageSnapshot retrieves the snapshot entry of an storage trie leaf.
95+
// ReadStorageSnapshot retrieves the snapshot entry of a storage trie leaf.
9696
func ReadStorageSnapshot(db ethdb.KeyValueReader, accountHash, storageHash common.Hash) []byte {
9797
data, _ := db.Get(storageSnapshotKey(accountHash, storageHash))
9898
return data
9999
}
100100

101-
// WriteStorageSnapshot stores the snapshot entry of an storage trie leaf.
101+
// WriteStorageSnapshot stores the snapshot entry of a storage trie leaf.
102102
func WriteStorageSnapshot(db ethdb.KeyValueWriter, accountHash, storageHash common.Hash, entry []byte) {
103103
if err := db.Put(storageSnapshotKey(accountHash, storageHash), entry); err != nil {
104104
log.Crit("Failed to store storage snapshot", "err", err)
105105
}
106106
}
107107

108-
// DeleteStorageSnapshot removes the snapshot entry of an storage trie leaf.
108+
// DeleteStorageSnapshot removes the snapshot entry of a storage trie leaf.
109109
func DeleteStorageSnapshot(db ethdb.KeyValueWriter, accountHash, storageHash common.Hash) {
110110
if err := db.Delete(storageSnapshotKey(accountHash, storageHash)); err != nil {
111111
log.Crit("Failed to delete storage snapshot", "err", err)

crypto/secp256k1/secp256_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func randSig() []byte {
4848
}
4949

5050
// tests for malleability
51-
// highest bit of signature ECDSA s value must be 0, in the 33th byte
51+
// the highest bit of signature ECDSA s value must be 0, in the 33th byte
5252
func compactSigCheck(t *testing.T, sig []byte) {
5353
var b = int(sig[32])
5454
if b < 0 {

metrics/sample.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func SamplePercentile(values []int64, p float64) float64 {
153153
}
154154

155155
// CalculatePercentiles returns a slice of arbitrary percentiles of the slice of
156-
// int64. This method returns interpolated results, so e.g if there are only two
156+
// int64. This method returns interpolated results, so e.g. if there are only two
157157
// values, [0, 10], a 50% percentile will land between them.
158158
//
159159
// Note: As a side-effect, this method will also sort the slice of values.

rpc/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (s *Server) SetHTTPBodyLimit(limit int) {
8888
}
8989

9090
// RegisterName creates a service for the given receiver type under the given name. When no
91-
// methods on the given receiver match the criteria to be either a RPC method or a
91+
// methods on the given receiver match the criteria to be either an RPC method or a
9292
// subscription an error is returned. Otherwise a new service is created and added to the
9393
// service collection this server provides to clients.
9494
func (s *Server) RegisterName(name string, receiver interface{}) error {

rpc/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (r *serviceRegistry) subscription(service, name string) *callback {
110110
}
111111

112112
// suitableCallbacks iterates over the methods of the given type. It determines if a method
113-
// satisfies the criteria for a RPC callback or a subscription callback and adds it to the
113+
// satisfies the criteria for an RPC callback or a subscription callback and adds it to the
114114
// collection of callbacks. See server documentation for a summary of these criteria.
115115
func suitableCallbacks(receiver reflect.Value) map[string]*callback {
116116
typ := receiver.Type()

0 commit comments

Comments
 (0)