diff --git a/database/staking_validators.go b/database/staking_validators.go index 04043cf1a..d5af551e5 100644 --- a/database/staking_validators.go +++ b/database/staking_validators.go @@ -436,7 +436,7 @@ ON CONFLICT (validator_address) DO UPDATE WHERE validator_status.height <= excluded.height` _, err = db.SQL.Exec(statusStmt, statusParams...) if err != nil { - return fmt.Errorf("error while stroring validators statuses: %s", err) + return fmt.Errorf("error while storing validators statuses: %s", err) } return nil diff --git a/database/staking_validators_test.go b/database/staking_validators_test.go index 3fce81e5e..2539c9180 100644 --- a/database/staking_validators_test.go +++ b/database/staking_validators_test.go @@ -246,7 +246,7 @@ VALUES ('cosmosvalcons1qqqqrezrl53hujmpdch6d805ac75n220ku09rl', func (suite *DbTestSuite) TestGetValidators() { suite.getAccount("cosmos1z4hfrxvlgl4s8u4n5ngjcw8kdqrcv43599amxs") suite.getAccount("cosmos184ma3twcfjqef6k95ne8w2hk80x2kah7vcwy4a") - // Inser the test data + // Insert the test data queries := []string{ `INSERT INTO validator (consensus_address, consensus_pubkey) VALUES ('cosmosvalcons1qqqqrezrl53hujmpdch6d805ac75n220ku09rl', 'cosmosvalconspub1zcjduepq7mft6gfls57a0a42d7uhx656cckhfvtrlmw744jv4q0mvlv0dypskehfk8')`, `INSERT INTO validator (consensus_address, consensus_pubkey) VALUES ('cosmosvalcons1qq92t2l4jz5pt67tmts8ptl4p0jhr6utx5xa8y', 'cosmosvalconspub1zcjduepqe93asg05nlnj30ej2pe3r8rkeryyuflhtfw3clqjphxn4j3u27msrr63nk')`, diff --git a/modules/actions/types/handler.go b/modules/actions/types/handler.go index b16518e73..0d615d4bb 100644 --- a/modules/actions/types/handler.go +++ b/modules/actions/types/handler.go @@ -22,7 +22,7 @@ func NewContext(node node.Node, sources *modulestypes.Sources) *Context { } } -// GetHeight uses the lastest height when the input height is empty from graphql request +// GetHeight uses the latest height when the input height is empty from graphql request func (c *Context) GetHeight(payload *Payload) (int64, error) { if payload == nil || payload.Input.Height == 0 { latestHeight, err := c.node.LatestHeight() diff --git a/modules/consensus/handle_periodic_operations.go b/modules/consensus/handle_periodic_operations.go index 4f39023cf..32c61c11e 100644 --- a/modules/consensus/handle_periodic_operations.go +++ b/modules/consensus/handle_periodic_operations.go @@ -61,7 +61,7 @@ func (m *Module) updateBlockTimeInMinute() error { minute, err := m.db.GetBlockHeightTimeMinuteAgo(block.Timestamp) if err != nil { - return fmt.Errorf("error while gettting block height a minute ago: %s", err) + return fmt.Errorf("error while getting block height a minute ago: %s", err) } newBlockTime := block.Timestamp.Sub(minute.Timestamp).Seconds() / float64(block.Height-minute.Height) diff --git a/modules/distribution/handle_periodic_operations.go b/modules/distribution/handle_periodic_operations.go index 38ff5e50e..59c8e6ad6 100644 --- a/modules/distribution/handle_periodic_operations.go +++ b/modules/distribution/handle_periodic_operations.go @@ -17,7 +17,7 @@ func (m *Module) RegisterPeriodicOperations(scheduler *gocron.Scheduler) error { if _, err := scheduler.Every(1).Hour().Do(func() { utils.WatchMethod(m.GetLatestCommunityPool) }); err != nil { - return fmt.Errorf("error while scheduling distribution peridic operation: %s", err) + return fmt.Errorf("error while scheduling distribution periodic operation: %s", err) } return nil diff --git a/modules/distribution/source/remote/source.go b/modules/distribution/source/remote/source.go index 610b957fb..1d68b2eb0 100644 --- a/modules/distribution/source/remote/source.go +++ b/modules/distribution/source/remote/source.go @@ -18,7 +18,7 @@ type Source struct { distrClient distrtypes.QueryClient } -// NewSource returns a new Source instace +// NewSource returns a new Source instance func NewSource(source *remote.Source, distrClient distrtypes.QueryClient) *Source { return &Source{ Source: source, diff --git a/modules/distribution/utils_community_pool.go b/modules/distribution/utils_community_pool.go index 5e71f598e..2a3fe71c1 100644 --- a/modules/distribution/utils_community_pool.go +++ b/modules/distribution/utils_community_pool.go @@ -12,7 +12,7 @@ func (m *Module) updateCommunityPool(height int64) error { pool, err := m.source.CommunityPool(height) if err != nil { - return fmt.Errorf("error while getting comminity pool: %s", err) + return fmt.Errorf("error while getting community pool: %s", err) } // Store the pool into the database diff --git a/modules/mint/source/local/source.go b/modules/mint/source/local/source.go index ede4e8e97..74e3f4fc2 100644 --- a/modules/mint/source/local/source.go +++ b/modules/mint/source/local/source.go @@ -20,7 +20,7 @@ type Source struct { querier minttypes.QueryServer } -// NewSource returns a new Source instace +// NewSource returns a new Source instance func NewSource(source *local.Source, querier minttypes.QueryServer) *Source { return &Source{ Source: source, diff --git a/modules/pricefeed/coingecko/apis.go b/modules/pricefeed/coingecko/apis.go index eedd0f68a..2cf80fbcc 100644 --- a/modules/pricefeed/coingecko/apis.go +++ b/modules/pricefeed/coingecko/apis.go @@ -58,7 +58,7 @@ func queryCoinGecko(endpoint string, ptr interface{}) error { err = json.Unmarshal(bz, &ptr) if err != nil { - return fmt.Errorf("error while unmarshaling response body: %s", err) + return fmt.Errorf("error while unmarshalling response body: %s", err) } return nil diff --git a/modules/staking/handle_genesis.go b/modules/staking/handle_genesis.go index 1e5cce899..e8ddd52cf 100644 --- a/modules/staking/handle_genesis.go +++ b/modules/staking/handle_genesis.go @@ -24,7 +24,7 @@ func (m *Module) HandleGenesis(doc *tmtypes.GenesisDoc, appState map[string]json var genState stakingtypes.GenesisState err := m.cdc.UnmarshalJSON(appState[stakingtypes.ModuleName], &genState) if err != nil { - return fmt.Errorf("error while unmarshaling staking state: %s", err) + return fmt.Errorf("error while unmarshalling staking state: %s", err) } // Save the params diff --git a/modules/staking/keybase/apis.go b/modules/staking/keybase/apis.go index 3ec8969ee..fd1f0cbff 100644 --- a/modules/staking/keybase/apis.go +++ b/modules/staking/keybase/apis.go @@ -58,7 +58,7 @@ func queryKeyBase(endpoint string, ptr interface{}) error { err = json.Unmarshal(bz, &ptr) if err != nil { - return fmt.Errorf("error while unmarshaling response body: %s", err) + return fmt.Errorf("error while unmarshalling response body: %s", err) } return nil