Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphql, internal: fix typos in comments #27184

Merged
merged 4 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions graphql/graphql.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/build/gotool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
DavidRomanovizc marked this conversation as resolved.
Show resolved Hide resolved
pathTool := g.goTool("env", "GOPATH")
output, _ := pathTool.Output()
tool.Env = append(tool.Env, "GOPATH="+string(output))
Expand Down
2 changes: 1 addition & 1 deletion internal/build/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion internal/debug/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (h *HandlerT) StartGoTrace(file string) error {
return nil
}

// StopTrace stops an ongoing trace.
// StopGoTrace StopTrace stops an ongoing trace.
DavidRomanovizc marked this conversation as resolved.
Show resolved Hide resolved
func (h *HandlerT) StopGoTrace() error {
h.mu.Lock()
defer h.mu.Unlock()
Expand Down
14 changes: 7 additions & 7 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:]
Expand Down Expand Up @@ -1401,15 +1401,15 @@ 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"`
Error string `json:"error,omitempty"`
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)
Expand Down
2 changes: 1 addition & 1 deletion internal/jsre/jsre.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
DavidRomanovizc marked this conversation as resolved.
Show resolved Hide resolved
// When the runtime is stopped, fn will not execute.
func (re *JSRE) Do(fn func(*goja.Runtime)) {
done := make(chan bool)
Expand Down
2 changes: 1 addition & 1 deletion internal/jsre/pretty.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
DavidRomanovizc marked this conversation as resolved.
Show resolved Hide resolved
// 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)
Expand Down
2 changes: 1 addition & 1 deletion internal/shutdowncheck/shutdown_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type ShutdownTracker struct {
}

// NewShutdownTracker creates a new ShutdownTracker instance and has
// no other side-effect.
// no other side effect.
DavidRomanovizc marked this conversation as resolved.
Show resolved Hide resolved
func NewShutdownTracker(db ethdb.Database) *ShutdownTracker {
return &ShutdownTracker{
db: db,
Expand Down
2 changes: 1 addition & 1 deletion internal/web3ext/web3ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

// package web3ext contains geth specific web3.js extensions.
// Package web3ext package web3ext contains geth specific web3.js extensions.
holiman marked this conversation as resolved.
Show resolved Hide resolved
package web3ext

var Modules = map[string]string{
Expand Down
2 changes: 1 addition & 1 deletion les/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

// Package les implements the Light Ethereum Subprotocol.
// Package less implements the Light Ethereum Subprotocol.
DavidRomanovizc marked this conversation as resolved.
Show resolved Hide resolved
package les

import (
Expand Down
2 changes: 1 addition & 1 deletion les/txrelay.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
DavidRomanovizc marked this conversation as resolved.
Show resolved Hide resolved
if p.onlyAnnounce {
return
}
Expand Down