From 968b1080773317f9ad8904cacac1cacc38614cec Mon Sep 17 00:00:00 2001 From: dromanov Date: Fri, 28 Apr 2023 11:52:24 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix=20typos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- graphql/graphql.go | 6 +++--- internal/build/gotool.go | 2 +- internal/build/util.go | 2 +- internal/debug/trace.go | 2 +- internal/ethapi/api.go | 14 +++++++------- internal/jsre/jsre.go | 2 +- internal/jsre/pretty.go | 2 +- internal/shutdowncheck/shutdown_tracker.go | 2 +- internal/web3ext/web3ext.go | 2 +- les/client.go | 2 +- les/txrelay.go | 2 +- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/graphql/graphql.go b/graphql/graphql.go index ce3ca171cf56..77a83a6d7511 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -196,7 +196,7 @@ type Transaction struct { } // resolve returns the internal transaction object, fetching it if needed. -// It also returns the block the tx blongs to, unless it is a pending tx. +// It also returns the block the tx belongs to, unless it is a pending tx. func (t *Transaction) resolve(ctx context.Context) (*types.Transaction, *Block, error) { t.mu.Lock() defer t.mu.Unlock() @@ -1374,9 +1374,9 @@ func (s *SyncState) HealingBytecode() hexutil.Uint64 { return hexutil.Uint64(s.progress.HealingBytecode) } -// Syncing returns false in case the node is currently not syncing with the network. It can be up to date or has not +// Syncing returns false in case the node is currently not syncing with the network. It can be up-to-date or has not // yet received the latest block headers from its pears. In case it is synchronizing: -// - startingBlock: block number this node started to synchronise from +// - startingBlock: block number this node started to synchronize from // - currentBlock: block number this node is currently importing // - highestBlock: block number of the highest block header this node has received from peers // - syncedAccounts: number of accounts downloaded diff --git a/internal/build/gotool.go b/internal/build/gotool.go index 08c8b2ef05fe..2cd273f78211 100644 --- a/internal/build/gotool.go +++ b/internal/build/gotool.go @@ -74,7 +74,7 @@ func (g *GoToolchain) Install(gobin string, args ...string) *exec.Cmd { // Ensure GOPATH is set because go install seems to absolutely require it. This uses // 'go env' because it resolves the default value when GOPATH is not set in the // environment. Ignore errors running go env and leave any complaining about GOPATH to - // the install command. + // the installation command. pathTool := g.goTool("env", "GOPATH") output, _ := pathTool.Output() tool.Env = append(tool.Env, "GOPATH="+string(output)) diff --git a/internal/build/util.go b/internal/build/util.go index 9a721e9b83b1..3a0b384e5ee2 100644 --- a/internal/build/util.go +++ b/internal/build/util.go @@ -127,7 +127,7 @@ func render(tpl *template.Template, outputFile string, outputPerm os.FileMode, x } // UploadSFTP uploads files to a remote host using the sftp command line tool. -// The destination host may be specified either as [user@]host[: or as a URI in +// The destination host may be specified either as [user@]host: or as a URI in // the form sftp://[user@]host[:port]. func UploadSFTP(identityFile, host, dir string, files []string) error { sftp := exec.Command("sftp") diff --git a/internal/debug/trace.go b/internal/debug/trace.go index a273e4a9db84..e635ee355bee 100644 --- a/internal/debug/trace.go +++ b/internal/debug/trace.go @@ -48,7 +48,7 @@ func (h *HandlerT) StartGoTrace(file string) error { return nil } -// StopTrace stops an ongoing trace. +// StopGoTrace StopTrace stops an ongoing trace. func (h *HandlerT) StopGoTrace() error { h.mu.Lock() defer h.mu.Unlock() diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index f1041d6a50eb..5de720217e57 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -115,9 +115,9 @@ func (s *EthereumAPI) FeeHistory(ctx context.Context, blockCount math.HexOrDecim return results, nil } -// Syncing returns false in case the node is currently not syncing with the network. It can be up to date or has not +// Syncing returns false in case the node is currently not syncing with the network. It can be up-to-date or has not // yet received the latest block headers from its pears. In case it is synchronizing: -// - startingBlock: block number this node started to synchronise from +// - startingBlock: block number this node started to synchronize from // - currentBlock: block number this node is currently importing // - highestBlock: block number of the highest block header this node has received from peers // - pulledStates: number of state entries processed until now @@ -149,7 +149,7 @@ func (s *EthereumAPI) Syncing() (interface{}, error) { }, nil } -// TxPoolAPI offers and API for the transaction pool. It only operates on data that is non confidential. +// TxPoolAPI offers and API for the transaction pool. It only operates on data that is non-confidential. type TxPoolAPI struct { b Backend } @@ -336,7 +336,7 @@ func (s *PersonalAccountAPI) OpenWallet(url string, passphrase *string) error { return wallet.Open(pass) } -// DeriveAccount requests a HD wallet to derive a new account, optionally pinning +// DeriveAccount requests an HD wallet to derive a new account, optionally pinning // it for later reuse. func (s *PersonalAccountAPI) DeriveAccount(url string, path string, pin *bool) (accounts.Account, error) { wallet, err := s.am.Wallet(url) @@ -711,7 +711,7 @@ func (s *BlockChainAPI) GetProof(ctx context.Context, address common.Address, st } // decodeHash parses a hex-encoded 32-byte hash. The input may optionally -// be prefixed by 0x and can have an byte length up to 32. +// be prefixed by 0x and can have a byte length up to 32. func decodeHash(s string) (common.Hash, error) { if strings.HasPrefix(s, "0x") || strings.HasPrefix(s, "0X") { s = s[2:] @@ -1401,7 +1401,7 @@ func newRPCTransactionFromBlockHash(b *types.Block, hash common.Hash, config *pa } // accessListResult returns an optional accesslist -// Its the result of the `debug_createAccessList` RPC call. +// It's the result of the `debug_createAccessList` RPC call. // It contains an error if the transaction itself failed. type accessListResult struct { Accesslist *types.AccessList `json:"accessList"` @@ -1409,7 +1409,7 @@ type accessListResult struct { GasUsed hexutil.Uint64 `json:"gasUsed"` } -// CreateAccessList creates a EIP-2930 type AccessList for the given transaction. +// CreateAccessList creates an EIP-2930 type AccessList for the given transaction. // Reexec and BlockNrOrHash can be specified to create the accessList on top of a certain state. func (s *BlockChainAPI) CreateAccessList(ctx context.Context, args TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash) (*accessListResult, error) { bNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber) diff --git a/internal/jsre/jsre.go b/internal/jsre/jsre.go index f6e21d2ef701..650024e4c9c9 100644 --- a/internal/jsre/jsre.go +++ b/internal/jsre/jsre.go @@ -220,7 +220,7 @@ loop: } } -// Do executes the given function on the JS event loop. +// Do execute the given function on the JS event loop. // When the runtime is stopped, fn will not execute. func (re *JSRE) Do(fn func(*goja.Runtime)) { done := make(chan bool) diff --git a/internal/jsre/pretty.go b/internal/jsre/pretty.go index bd772b4927c2..51893cfbbd0e 100644 --- a/internal/jsre/pretty.go +++ b/internal/jsre/pretty.go @@ -208,7 +208,7 @@ func (ctx ppctx) fields(obj *goja.Object) []string { key := SafeGet(obj, k) if key == nil { // The value corresponding to that key could not be found - // (typically because it is backed by an RPC call that is + // typically because it is backed by an RPC call that is // not supported by this instance. Add it to the list of // values so that it appears as `undefined` to the user. vals = append(vals, k) diff --git a/internal/shutdowncheck/shutdown_tracker.go b/internal/shutdowncheck/shutdown_tracker.go index c95b4f02f4b0..073e4b6f9c96 100644 --- a/internal/shutdowncheck/shutdown_tracker.go +++ b/internal/shutdowncheck/shutdown_tracker.go @@ -34,7 +34,7 @@ type ShutdownTracker struct { } // NewShutdownTracker creates a new ShutdownTracker instance and has -// no other side-effect. +// no other side effect. func NewShutdownTracker(db ethdb.Database) *ShutdownTracker { return &ShutdownTracker{ db: db, diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index 388eed8a2fa6..1828abdfb47f 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -// package web3ext contains geth specific web3.js extensions. +// Package web3ext package web3ext contains geth specific web3.js extensions. package web3ext var Modules = map[string]string{ diff --git a/les/client.go b/les/client.go index 8eb46c2e63ed..e1182e186eea 100644 --- a/les/client.go +++ b/les/client.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -// Package les implements the Light Ethereum Subprotocol. +// Package less implements the Light Ethereum Subprotocol. package les import ( diff --git a/les/txrelay.go b/les/txrelay.go index 40a51fb76f8e..d68365e06b0c 100644 --- a/les/txrelay.go +++ b/les/txrelay.go @@ -56,7 +56,7 @@ func (ltrx *lesTxRelay) registerPeer(p *serverPeer) { ltrx.lock.Lock() defer ltrx.lock.Unlock() - // Short circuit if the peer is announce only. + // Short circuit if the peer is announced only. if p.onlyAnnounce { return } From fdc9e52cc8187ee01521242075050c14ff34ca87 Mon Sep 17 00:00:00 2001 From: dromanov Date: Fri, 28 Apr 2023 16:26:27 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=E2=8F=AA=EF=B8=8F=20Revert=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/build/gotool.go | 2 +- internal/debug/trace.go | 2 +- internal/jsre/jsre.go | 2 +- internal/jsre/pretty.go | 2 +- internal/shutdowncheck/shutdown_tracker.go | 2 +- les/client.go | 2 +- les/txrelay.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/build/gotool.go b/internal/build/gotool.go index 2cd273f78211..08c8b2ef05fe 100644 --- a/internal/build/gotool.go +++ b/internal/build/gotool.go @@ -74,7 +74,7 @@ func (g *GoToolchain) Install(gobin string, args ...string) *exec.Cmd { // Ensure GOPATH is set because go install seems to absolutely require it. This uses // 'go env' because it resolves the default value when GOPATH is not set in the // environment. Ignore errors running go env and leave any complaining about GOPATH to - // the installation command. + // the install command. pathTool := g.goTool("env", "GOPATH") output, _ := pathTool.Output() tool.Env = append(tool.Env, "GOPATH="+string(output)) diff --git a/internal/debug/trace.go b/internal/debug/trace.go index e635ee355bee..eea879823429 100644 --- a/internal/debug/trace.go +++ b/internal/debug/trace.go @@ -48,7 +48,7 @@ func (h *HandlerT) StartGoTrace(file string) error { return nil } -// StopGoTrace StopTrace stops an ongoing trace. +// StopGoTrace stops an ongoing trace. func (h *HandlerT) StopGoTrace() error { h.mu.Lock() defer h.mu.Unlock() diff --git a/internal/jsre/jsre.go b/internal/jsre/jsre.go index 650024e4c9c9..f6e21d2ef701 100644 --- a/internal/jsre/jsre.go +++ b/internal/jsre/jsre.go @@ -220,7 +220,7 @@ loop: } } -// Do execute the given function on the JS event loop. +// Do executes the given function on the JS event loop. // When the runtime is stopped, fn will not execute. func (re *JSRE) Do(fn func(*goja.Runtime)) { done := make(chan bool) diff --git a/internal/jsre/pretty.go b/internal/jsre/pretty.go index 51893cfbbd0e..bd772b4927c2 100644 --- a/internal/jsre/pretty.go +++ b/internal/jsre/pretty.go @@ -208,7 +208,7 @@ func (ctx ppctx) fields(obj *goja.Object) []string { key := SafeGet(obj, k) if key == nil { // The value corresponding to that key could not be found - // typically because it is backed by an RPC call that is + // (typically because it is backed by an RPC call that is // not supported by this instance. Add it to the list of // values so that it appears as `undefined` to the user. vals = append(vals, k) diff --git a/internal/shutdowncheck/shutdown_tracker.go b/internal/shutdowncheck/shutdown_tracker.go index 073e4b6f9c96..c95b4f02f4b0 100644 --- a/internal/shutdowncheck/shutdown_tracker.go +++ b/internal/shutdowncheck/shutdown_tracker.go @@ -34,7 +34,7 @@ type ShutdownTracker struct { } // NewShutdownTracker creates a new ShutdownTracker instance and has -// no other side effect. +// no other side-effect. func NewShutdownTracker(db ethdb.Database) *ShutdownTracker { return &ShutdownTracker{ db: db, diff --git a/les/client.go b/les/client.go index e1182e186eea..8eb46c2e63ed 100644 --- a/les/client.go +++ b/les/client.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -// Package less implements the Light Ethereum Subprotocol. +// Package les implements the Light Ethereum Subprotocol. package les import ( diff --git a/les/txrelay.go b/les/txrelay.go index d68365e06b0c..40a51fb76f8e 100644 --- a/les/txrelay.go +++ b/les/txrelay.go @@ -56,7 +56,7 @@ func (ltrx *lesTxRelay) registerPeer(p *serverPeer) { ltrx.lock.Lock() defer ltrx.lock.Unlock() - // Short circuit if the peer is announced only. + // Short circuit if the peer is announce only. if p.onlyAnnounce { return } From 25f025f4ff320b974ed693ca510f87bbcc16f122 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Tue, 2 May 2023 04:21:06 -0400 Subject: [PATCH 3/3] Update internal/web3ext/web3ext.go --- internal/web3ext/web3ext.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index 1828abdfb47f..6118c11246b1 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -// Package web3ext package web3ext contains geth specific web3.js extensions. +// Package web3ext contains geth specific web3.js extensions. package web3ext var Modules = map[string]string{