fix: correct typos across codebase (comments, strings)

This commit is contained in:
vipocenka 2025-08-15 15:57:53 +03:00
parent 1693a48f8c
commit 1fececcd54
14 changed files with 20 additions and 20 deletions

View file

@ -56,7 +56,7 @@ var ErrPINNeeded = errors.New("smartcard: pin needed")
// ErrPINUnblockNeeded is returned if opening the smart card requires a PIN code, // ErrPINUnblockNeeded is returned if opening the smart card requires a PIN code,
// but all PIN attempts have already been exhausted. In this case the calling // but all PIN attempts have already been exhausted. In this case the calling
// application should request user input for the PUK and a new PIN code to set // application should request user input for the PUK and a new PIN code to set
// fo the card. // for the card.
var ErrPINUnblockNeeded = errors.New("smartcard: pin unblock needed") var ErrPINUnblockNeeded = errors.New("smartcard: pin unblock needed")
// ErrAlreadyOpen is returned if the smart card is attempted to be opened, but // ErrAlreadyOpen is returned if the smart card is attempted to be opened, but

View file

@ -175,7 +175,7 @@ to check if the node disconnects after receiving multiple invalid requests.`)
}, },
} }
// Send request 10 times. Some clients are lient on the first few invalids. // Send request 10 times. Some clients are lenient on the first few invalids.
for i := 0; i < 10; i++ { for i := 0; i < 10; i++ {
badReq.RequestId = uint64(i) badReq.RequestId = uint64(i)
if err := conn.Write(ethProto, eth.GetBlockHeadersMsg, badReq); err != nil { if err := conn.Write(ethProto, eth.GetBlockHeadersMsg, badReq); err != nil {
@ -542,7 +542,7 @@ func (s *Suite) TestBlockRangeUpdateInvalid(t *utesting.T) {
func (s *Suite) TestBlockRangeUpdateFuture(t *utesting.T) { func (s *Suite) TestBlockRangeUpdateFuture(t *utesting.T) {
t.Log(`This test sends a BlockRangeUpdate that is beyond the chain head. t.Log(`This test sends a BlockRangeUpdate that is beyond the chain head.
The node should accept the update and should not disonnect.`) The node should accept the update and should not disconnect.`)
conn, err := s.dialAndPeer(nil) conn, err := s.dialAndPeer(nil)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
@ -578,7 +578,7 @@ The node should accept the update and should not disonnect.`)
func (s *Suite) TestBlockRangeUpdateHistoryExp(t *utesting.T) { func (s *Suite) TestBlockRangeUpdateHistoryExp(t *utesting.T) {
t.Log(`This test sends a BlockRangeUpdate announcing incomplete (expired) history. t.Log(`This test sends a BlockRangeUpdate announcing incomplete (expired) history.
The node should accept the update and should not disonnect.`) The node should accept the update and should not disconnect.`)
conn, err := s.dialAndPeer(nil) conn, err := s.dialAndPeer(nil)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)

View file

@ -445,7 +445,7 @@ func (m *singleMatcherInstance) cleanMapIndices() {
m.mapIndices = m.mapIndices[:j] m.mapIndices = m.mapIndices[:j]
} }
// matchAny combinines a set of matchers and returns a match for every position // matchAny combines a set of matchers and returns a match for every position
// where any of the underlying matchers signaled a match. A zero-length matchAny // where any of the underlying matchers signaled a match. A zero-length matchAny
// acts as a "wild card" that signals a potential match at every position. // acts as a "wild card" that signals a potential match at every position.
type matchAny []matcher type matchAny []matcher
@ -458,7 +458,7 @@ type matchAnyInstance struct {
} }
// matchAnyResults is used by matchAnyInstance to collect results from all // matchAnyResults is used by matchAnyInstance to collect results from all
// child matchers for a specific map index. Once all results has been received // child matchers for a specific map index. Once all results have been received
// a merged result is returned for the given map and this structure is discarded. // a merged result is returned for the given map and this structure is discarded.
type matchAnyResults struct { type matchAnyResults struct {
matches []potentialMatches matches []potentialMatches

View file

@ -29,7 +29,7 @@ import (
// TransitionState is a structure that holds the progress markers of the // TransitionState is a structure that holds the progress markers of the
// translation process. // translation process.
type TransitionState struct { type TransitionState struct {
CurrentAccountAddress *common.Address // addresss of the last translated account CurrentAccountAddress *common.Address // address of the last translated account
CurrentSlotHash common.Hash // hash of the last translated storage slot CurrentSlotHash common.Hash // hash of the last translated storage slot
CurrentPreimageOffset int64 // next byte to read from the preimage file CurrentPreimageOffset int64 // next byte to read from the preimage file
Started, Ended bool Started, Ended bool

View file

@ -563,7 +563,7 @@ func DeleteBlockLvPointers(db ethdb.KeyValueStore, blocks common.Range[uint64],
} }
// FilterMapsRange is a storage representation of the block range covered by the // FilterMapsRange is a storage representation of the block range covered by the
// filter maps structure and the corresponting log value index range. // filter maps structure and the corresponding log value index range.
type FilterMapsRange struct { type FilterMapsRange struct {
Version uint32 Version uint32
HeadIndexed bool HeadIndexed bool

View file

@ -597,7 +597,7 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
return nil return nil
} }
// This is the list of known 'metadata' keys stored in the databasse. // This is the list of known 'metadata' keys stored in the database.
var knownMetadataKeys = [][]byte{ var knownMetadataKeys = [][]byte{
databaseVersionKey, headHeaderKey, headBlockKey, headFastBlockKey, headFinalizedBlockKey, databaseVersionKey, headHeaderKey, headBlockKey, headFastBlockKey, headFinalizedBlockKey,
lastPivotKey, fastTrieProgressKey, snapshotDisabledKey, SnapshotRootKey, snapshotJournalKey, lastPivotKey, fastTrieProgressKey, snapshotDisabledKey, SnapshotRootKey, snapshotJournalKey,
@ -659,7 +659,7 @@ func ReadChainMetadata(db ethdb.KeyValueStore) [][]string {
// is periodically called and if it returns an error then SafeDeleteRange // is periodically called and if it returns an error then SafeDeleteRange
// stops and also returns that error. The callback is not called if native // stops and also returns that error. The callback is not called if native
// range delete is used or there are a small number of keys only. The bool // range delete is used or there are a small number of keys only. The bool
// argument passed to the callback is true if enrties have actually been // argument passed to the callback is true if entries have actually been
// deleted already. // deleted already.
func SafeDeleteRange(db ethdb.KeyValueStore, start, end []byte, hashScheme bool, stopCallback func(bool) bool) error { func SafeDeleteRange(db ethdb.KeyValueStore, start, end []byte, hashScheme bool, stopCallback func(bool) bool) error {
if !hashScheme { if !hashScheme {

View file

@ -585,7 +585,7 @@ func (st *stateTransition) validateAuthorization(auth *types.SetCodeAuthorizatio
return authority, fmt.Errorf("%w: %v", ErrAuthorizationInvalidSignature, err) return authority, fmt.Errorf("%w: %v", ErrAuthorizationInvalidSignature, err)
} }
// Check the authority account // Check the authority account
// 1) doesn't have code or has exisiting delegation // 1) doesn't have code or has existing delegation
// 2) matches the auth's nonce // 2) matches the auth's nonce
// //
// Note it is added to the access list even if the authorization is invalid. // Note it is added to the access list even if the authorization is invalid.

View file

@ -217,7 +217,7 @@ func makeTx(nonce uint64, gasTipCap uint64, gasFeeCap uint64, blobFeeCap uint64,
return types.MustSignNewTx(key, types.LatestSigner(params.MainnetChainConfig), blobtx) return types.MustSignNewTx(key, types.LatestSigner(params.MainnetChainConfig), blobtx)
} }
// makeMultiBlobTx is a utility method to construct a ramdom blob tx with // makeMultiBlobTx is a utility method to construct a random blob tx with
// certain number of blobs in its sidecar. // certain number of blobs in its sidecar.
func makeMultiBlobTx(nonce uint64, gasTipCap uint64, gasFeeCap uint64, blobFeeCap uint64, blobCount int, blobOffset int, key *ecdsa.PrivateKey, version byte) *types.Transaction { func makeMultiBlobTx(nonce uint64, gasTipCap uint64, gasFeeCap uint64, blobFeeCap uint64, blobCount int, blobOffset int, key *ecdsa.PrivateKey, version byte) *types.Transaction {
var ( var (

View file

@ -21,7 +21,7 @@ import (
) )
type txMetadata struct { type txMetadata struct {
id uint64 // the billy id of transction id uint64 // the billy id of transaction
size uint64 // the RLP encoded size of transaction (blobs are included) size uint64 // the RLP encoded size of transaction (blobs are included)
} }

View file

@ -82,8 +82,8 @@ const (
minTrienodeHealThrottle = 1 minTrienodeHealThrottle = 1
// maxTrienodeHealThrottle is the maximum divisor for throttling trie node // maxTrienodeHealThrottle is the maximum divisor for throttling trie node
// heal requests to avoid overloading the local node and exessively expanding // heal requests to avoid overloading the local node and excessively expanding
// the state trie bedth wise. // the state trie breadth wise.
maxTrienodeHealThrottle = maxTrieRequestCount maxTrienodeHealThrottle = maxTrieRequestCount
// trienodeHealThrottleIncrease is the multiplier for the throttle when the // trienodeHealThrottleIncrease is the multiplier for the throttle when the

View file

@ -156,7 +156,7 @@ func (f *BigFlag) IsSet() bool { return f.HasBeenSet }
func (f *BigFlag) String() string { return cli.FlagStringer(f) } func (f *BigFlag) String() string { return cli.FlagStringer(f) }
func (f *BigFlag) Apply(set *flag.FlagSet) error { func (f *BigFlag) Apply(set *flag.FlagSet) error {
// Set default value so that environment wont be able to overwrite it // Set default value so that environment won't be able to overwrite it
if f.Value != nil { if f.Value != nil {
f.defaultValue = new(big.Int).Set(f.Value) f.defaultValue = new(big.Int).Set(f.Value)
} }

View file

@ -51,7 +51,7 @@ func (n *Node) apis() []rpc.API {
} }
// adminAPI is the collection of administrative API methods exposed over // adminAPI is the collection of administrative API methods exposed over
// both secure and unsecure RPC channels. // both secure and insecure RPC channels.
type adminAPI struct { type adminAPI struct {
node *Node // Node interfaced by this API node *Node // Node interfaced by this API
} }

View file

@ -207,7 +207,7 @@ func AsyncFilter(it Iterator, check AsyncFilterFunc, workers int) Iterator {
item := iteratorItem{nn, nodeSource} item := iteratorItem{nn, nodeSource}
select { select {
case f.passed <- item: case f.passed <- item:
case <-ctx.Done(): // bale out if downstream is already closed and not calling Next case <-ctx.Done(): // bail out if downstream is already closed and not calling Next
} }
} }
f.slots <- struct{}{} f.slots <- struct{}{}

View file

@ -184,7 +184,7 @@ func fuzzUnmarshalG1(input []byte) int {
} }
return 1 return 1
} else { } else {
panic(fmt.Sprintf("error missmatch: cf: %v g: %v gn: %v", errC, errG, errS)) panic(fmt.Sprintf("error mismatch: cf: %v g: %v gn: %v", errC, errG, errS))
} }
} }
@ -211,7 +211,7 @@ func fuzzUnmarshalG2(input []byte) int {
} }
return 1 return 1
} else { } else {
panic(fmt.Sprintf("error missmatch: cf: %v g: %v gn: %v", errC, errG, errS)) panic(fmt.Sprintf("error mismatch: cf: %v g: %v gn: %v", errC, errG, errS))
} }
} }