Enable misspell linter & fix findings (#12272)

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
Justin Traglia 2023-04-14 05:03:11 -05:00 committed by GitHub
parent f376427add
commit 9f7711e74a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 13 additions and 12 deletions

View File

@ -17,6 +17,7 @@ linters:
- errcheck
- gosimple
- gocognit
- misspell
linters-settings:
gocognit:

View File

@ -54,7 +54,7 @@ type head struct {
// This saves head info to the local service cache, it also saves the
// new head root to the DB.
// Caller of the method MUST aqcuire a lock on forkchoice.
// Caller of the method MUST acquire a lock on forkchoice.
func (s *Service) saveHead(ctx context.Context, newHeadRoot [32]byte, headBlock interfaces.ReadOnlySignedBeaconBlock, headState state.BeaconState) error {
ctx, span := trace.StartSpan(ctx, "blockChain.saveHead")
defer span.End()

View File

@ -233,7 +233,7 @@ func New(cliCtx *cli.Context, opts ...Option) (*BeaconNode, error) {
return nil, err
}
log.Debugln("Registering Intial Sync Service")
log.Debugln("Registering Initial Sync Service")
if err := beacon.registerInitialSyncService(); err != nil {
return nil, err
}

View File

@ -332,7 +332,7 @@ func (s *Service) isPeerAtLimit(inbound bool) bool {
return activePeers >= maxPeers || numOfConns >= maxPeers
}
// PeersFromStringAddrs convers peer raw ENRs into multiaddrs for p2p.
// PeersFromStringAddrs converts peer raw ENRs into multiaddrs for p2p.
func PeersFromStringAddrs(addrs []string) ([]ma.Multiaddr, error) {
var allAddrs []ma.Multiaddr
enodeString, multiAddrString := parseGenericAddrs(addrs)

View File

@ -272,7 +272,7 @@ func (p *TestP2P) AddConnectionHandler(f, _ func(ctx context.Context, id peer.ID
p.peers.SetConnectionState(conn.RemotePeer(), peers.PeerConnecting)
if err := f(ctx, conn.RemotePeer()); err != nil {
logrus.WithError(err).Error("Could not send succesful hello rpc request")
logrus.WithError(err).Error("Could not send successful hello rpc request")
if err := p.Disconnect(conn.RemotePeer()); err != nil {
logrus.WithError(err).Errorf("Unable to close peer %s", conn.RemotePeer())
}

View File

@ -59,7 +59,7 @@ func privKey(cfg *Config) (*ecdsa.PrivateKey, error) {
if err != nil && defaultKeysExist {
return nil, err
}
// Default keys have the next highest precendence, if they exist.
// Default keys have the next highest precedence, if they exist.
if defaultKeysExist {
return privKeyFromFile(defaultKeyPath)
}

View File

@ -503,7 +503,7 @@ func (bs *Server) GetValidatorParticipation(
if err != nil {
return nil, err
}
// Get as close as we can to the end of the current epoch without going past the curent slot.
// Get as close as we can to the end of the current epoch without going past the current slot.
// The above check ensures a future *epoch* isn't requested, but the end slot of the requested epoch could still
// be past the current slot. In that case, use the current slot as the best approximation of the requested epoch.
// Replayer will make sure the slot ultimately used is canonical.

View File

@ -263,7 +263,7 @@ func (s *Service) validateBeaconBlock(ctx context.Context, blk interfaces.ReadOn
// [REJECT] The block's execution payload timestamp is correct with respect to the slot --
// i.e. execution_payload.timestamp == compute_timestamp_at_slot(state, block.slot).
//
// If exection_payload verification of block's parent by an execution node is not complete:
// If execution_payload verification of block's parent by an execution node is not complete:
// [REJECT] The block's parent (defined by block.parent_root) passes all validation (excluding execution
// node verification of the block.body.execution_payload).
// otherwise:

View File

@ -172,7 +172,7 @@ var (
// P2PDenyList defines a list of CIDR subnets to disallow connections from them.
P2PDenyList = &cli.StringSliceFlag{
Name: "p2p-denylist",
Usage: "The CIDR subnets for denying certainy peer connections. " +
Usage: "The CIDR subnets for denying certainty peer connections. " +
"Using \"private\" would deny all private subnets. Example: " +
"192.168.0.0/16 would deny connections from peers on your local network only. The " +
"default is to accept all connections.",
@ -222,7 +222,7 @@ var (
// GrpcMaxCallRecvMsgSizeFlag defines the max call message size for GRPC
GrpcMaxCallRecvMsgSizeFlag = &cli.IntFlag{
Name: "grpc-max-msg-size",
Usage: "Integer to define max recieve message call size. If serving a public gRPC server, " +
Usage: "Integer to define max receive message call size. If serving a public gRPC server, " +
"set this to a more reasonable size to avoid resource exhaustion from large messages. " +
"Validators with as many as 10000 keys can be run with a max message size of less than " +
"50Mb. The default here is set to a very high value for local users. " +

View File

@ -41,7 +41,7 @@ var (
var Commands = []*cli.Command{
{
Name: "validator",
Aliases: []string{"v", "sign"}, // remove sign command should be depreciated but having as backwards compatability.
Aliases: []string{"v", "sign"}, // remove sign command should be depreciated but having as backwards compatibility.
Usage: "commands that affect the state of validators such as exiting or withdrawing",
Subcommands: []*cli.Command{
{

View File

@ -195,7 +195,7 @@ func OpenWalletOrElseCli(cliCtx *cli.Context, otherwise func(cliCtx *cli.Context
// NewWalletForWeb3Signer returns a new wallet for web3 signer which is temporary and not stored locally.
func NewWalletForWeb3Signer() *Wallet {
// wallet is just a temporary wallet for web3 signer used to call intialize keymanager.
// wallet is just a temporary wallet for web3 signer used to call initialize keymanager.
return &Wallet{
walletDir: "",
accountsPath: "",

View File

@ -20,7 +20,7 @@ type MnemonicGenerator struct {
skipMnemonicConfirm bool
}
// ErrUnsupportedMnemonicLanguage is returned when trying to use an unsupported mnemonic langauge.
// ErrUnsupportedMnemonicLanguage is returned when trying to use an unsupported mnemonic language.
var (
DefaultMnemonicLanguage = "english"
ErrUnsupportedMnemonicLanguage = errors.New("unsupported mnemonic language")