Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
fix(eth/polar): fix typos (#1307)
Browse files Browse the repository at this point in the history
There are some typos.


## Summary by CodeRabbit

- **Refactor**
  - Updated terminology for clarity in the codebase, including renaming interfaces and methods to better reflect their purpose.
  
- **Documentation**
  - Improved log messages for more accurate debugging information.
  - Removed duplicate comments to enhance code maintainability.
  - Updated comments to align with the renamed functions and variables for consistency.

- **Style**
  - Made minor adjustments to comments for consistency in naming conventions.
  • Loading branch information
dbadoy committed Nov 15, 2023
1 parent 98379d0 commit d1ffd73
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions eth/core/precompile/method.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ type method struct {
// that implements the respective precompile method.
rcvr StatefulImpl

// AbiMethod is the ABI `Methods` struct corresponding to this precompile's executable.
// abiMethod is the ABI `Methods` struct corresponding to this precompile's executable.
abiMethod abi.Method

// Execute is the precompile's executable which will execute the logic of the implemented
// execute is the precompile's executable which will execute the logic of the implemented
// ABI method.
execute reflect.Method
}
Expand Down
6 changes: 3 additions & 3 deletions eth/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ type (
Has(hash common.Hash) bool
}

// ExecutionLayerNode is the entrypoint for the evm execution environment.
// NetworkingStack is the entrypoint for the evm execution environment.
NetworkingStack interface {
// IsExtRPCEnabled returns true if the networking stack is configured to expose JSON-RPC API.
// ExtRPCEnabled returns true if the networking stack is configured to expose JSON-RPC API.
ExtRPCEnabled() bool

// RegisterHandler manually registers a new handler into the networking stack.
Expand All @@ -72,7 +72,7 @@ type (
// Start starts the networking stack.
Start() error

// Close stops the networking stack
// Close stops the networking stack.
Close() error
}

Expand Down
5 changes: 3 additions & 2 deletions eth/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ func (n *GethExecutionNode) ExtRPCEnabled() bool {
return n.Node.Config().ExtRPCEnabled()
}

// ExtRPCEnabled returns whether or not the external RPC service is enabled.
// EventMux retrieves the event multiplexer used by all the network services in
// the current protocol stack.
func (n *GethExecutionNode) EventMux() *event.TypeMux { //nolint:staticcheck // still in geth.
return n.Node.EventMux()
}

// DefaultConfig returns the default configuration for the provider.
// DefaultGethNodeConfig returns the default configuration for the provider.
func DefaultGethNodeConfig() *node.Config {
nodeCfg := node.DefaultConfig
nodeCfg.P2P.NoDiscovery = true
Expand Down
2 changes: 1 addition & 1 deletion eth/polar/api/web3.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type Web3API interface {
Sha3(input hexutil.Bytes) hexutil.Bytes
}

// web3Api offers network related RPC methods.
// web3API offers network related RPC methods.
type web3API struct {
b Web3Backend
}
Expand Down
2 changes: 1 addition & 1 deletion eth/polar/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func (b *backend) GetLogs(
for i, receipt := range receipts {
logs[i] = receipt.Logs
}
b.logger.Debug("called eth.rpc.backend.GetBody", "block_hash", blockHash, "number", number)
b.logger.Debug("called eth.rpc.backend.GetLogs", "block_hash", blockHash, "number", number)
return logs, nil
}

Expand Down
3 changes: 0 additions & 3 deletions eth/polar/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ func New(
stack executionLayerNode,
logHandler log.Handler,
) *Polaris {
// When creating a Polaris EVM, we allow the implementing chain
// to specify their own log handler. If logHandler is nil then we
// we use the default geth log handler.
// When creating a Polaris EVM, we allow the implementing chain
// to specify their own log handler. If logHandler is nil then we
// we use the default geth log handler.
Expand Down
2 changes: 1 addition & 1 deletion eth/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func ClientName(clientIdentifier string) string {
)
}

// runtimeInfo returns build and platform information about the current binary.
// Info returns build and platform information about the current binary.
//
// If the package that is currently executing is a prefixed by our go-ethereum
// module path, it will print out commit and date VCS information. Otherwise,
Expand Down

0 comments on commit d1ffd73

Please sign in to comment.