Skip to content

Commit

Permalink
Merge pull request #1032 from criadoperez/fix/criadoperez2
Browse files Browse the repository at this point in the history
Typos on go files
  • Loading branch information
VAIBHAVJINDAL3012 committed Aug 16, 2023
2 parents 59c0e4e + 04f34ff commit 7b7262a
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion slashing/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func GetCmdTick(cdc *codec.Codec) *cobra.Command {
hmTypes.HexToHexBytes(slashInfoBytes),
)

// braodcast messages
// broadcast messages
return helper.BroadcastMsgsWithCLI(cliCtx, []sdk.Msg{msg})
},
}
Expand Down
2 changes: 1 addition & 1 deletion slashing/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ func tickCountHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {

result, err := jsoniter.ConfigFastest.Marshal(&tickCount)
if err != nil {
RestLogger.Error("Error while marshalling resposne to Json", "error", err)
RestLogger.Error("Error while marshalling response to Json", "error", err)
hmRest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
return
}
Expand Down
8 changes: 4 additions & 4 deletions slashing/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger {
return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName))
}

// GetValidatorSigningInfo retruns the ValidatorSigningInfo for a specific validator
// GetValidatorSigningInfo returns the ValidatorSigningInfo for a specific validator
// ConsAddress
func (k *Keeper) GetValidatorSigningInfo(ctx sdk.Context, valID hmTypes.ValidatorID) (info hmTypes.ValidatorSigningInfo, found bool) {
store := ctx.KVStore(k.storeKey)
Expand Down Expand Up @@ -402,7 +402,7 @@ func (k *Keeper) FlushTotalSlashedAmount(ctx sdk.Context) {
}
}

// IterateBufferValSlashingInfosAndApplyFn interate ValidatorSlashingInfo and apply the given function.
// IterateBufferValSlashingInfosAndApplyFn iterate ValidatorSlashingInfo and apply the given function.
func (k *Keeper) IterateBufferValSlashingInfosAndApplyFn(ctx sdk.Context, f func(slashingInfo hmTypes.ValidatorSlashingInfo) error) error {
store := ctx.KVStore(k.storeKey)

Expand Down Expand Up @@ -518,7 +518,7 @@ func (k *Keeper) CopyBufferValSlashingInfosToTickData(ctx sdk.Context) error {
return err
}

// IterateTickValSlashingInfosAndApplyFn interate ValidatorSlashingInfo and apply the given function.
// IterateTickValSlashingInfosAndApplyFn iterate ValidatorSlashingInfo and apply the given function.
func (k *Keeper) IterateTickValSlashingInfosAndApplyFn(ctx sdk.Context, f func(slashingInfo hmTypes.ValidatorSlashingInfo) error) error {
store := ctx.KVStore(k.storeKey)

Expand Down Expand Up @@ -588,7 +588,7 @@ func (k *Keeper) GetSlashingSequences(ctx sdk.Context) (sequences []string) {
return
}

// IterateSlashingSequencesAndApplyFn interate validators and apply the given function.
// IterateSlashingSequencesAndApplyFn iterate validators and apply the given function.
func (k *Keeper) IterateSlashingSequencesAndApplyFn(ctx sdk.Context, f func(sequence string) error) {
store := ctx.KVStore(k.storeKey)

Expand Down
6 changes: 3 additions & 3 deletions slashing/side_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewPostTxHandler(k Keeper, contractCaller helper.IContractCaller) hmTypes.P
// SideHandleMsgTick handles MsgTick message for external call
func SideHandleMsgTick(ctx sdk.Context, k Keeper, msg types.MsgTick, contractCaller helper.IContractCaller) (result abci.ResponseDeliverSideTx) {
k.Logger(ctx).Debug("✅ Validating External call for tick msg")
k.Logger(ctx).Debug("✅ Succesfully validated External call for tick msg")
k.Logger(ctx).Debug("✅ Successfully validated External call for tick msg")
result.Result = abci.SideTxResultType_Yes
return
}
Expand Down Expand Up @@ -96,7 +96,7 @@ func SideHandleMsgTickAck(ctx sdk.Context, k Keeper, msg types.MsgTickAck, contr
return hmCommon.ErrorSideTx(k.Codespace(), common.CodeInvalidMsg)
}

k.Logger(ctx).Debug("✅ Succesfully validated External call for tick-ack msg")
k.Logger(ctx).Debug("✅ Successfully validated External call for tick-ack msg")
result.Result = abci.SideTxResultType_Yes
return
}
Expand Down Expand Up @@ -137,7 +137,7 @@ func SideHandleMsgUnjail(ctx sdk.Context, k Keeper, msg types.MsgUnjail, contrac
return hmCommon.ErrorSideTx(k.Codespace(), common.CodeInvalidMsg)
}

k.Logger(ctx).Debug("✅ Succesfully validated External call for tick msg")
k.Logger(ctx).Debug("✅ Successfully validated External call for tick msg")
result.Result = abci.SideTxResultType_Yes
return
}
Expand Down
4 changes: 2 additions & 2 deletions staking/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func getTotalValidatorPower(cliCtx context.CLIContext) http.HandlerFunc {

result, err := jsoniter.ConfigFastest.Marshal(map[string]interface{}{"result": totalPower})
if err != nil {
RestLogger.Error("Error while marshalling resposne to Json", "error", err)
RestLogger.Error("Error while marshalling response to Json", "error", err)
hmRest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())

return
Expand Down Expand Up @@ -526,7 +526,7 @@ func proposerBonusPercentHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {

result, err := jsoniter.ConfigFastest.Marshal(_proposerBonusPercent)
if err != nil {
RestLogger.Error("Error while marshalling resposne to Json", "error", err)
RestLogger.Error("Error while marshalling response to Json", "error", err)
hmRest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())

return
Expand Down
2 changes: 1 addition & 1 deletion staking/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func InitGenesis(ctx sdk.Context, keeper Keeper, data types.GenesisState) {
panic(err)
}

// increament accum if init validator set
// increment accum if init validator set
if len(data.CurrentValSet.Validators) == 0 {
keeper.IncrementAccum(ctx, 1)
}
Expand Down
10 changes: 5 additions & 5 deletions staking/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (k *Keeper) GetAllValidators(ctx sdk.Context) (validators []*hmTypes.Valida
return
}

// IterateValidatorsAndApplyFn interate validators and apply the given function.
// IterateValidatorsAndApplyFn iterate validators and apply the given function.
func (k *Keeper) IterateValidatorsAndApplyFn(ctx sdk.Context, f func(validator hmTypes.Validator) error) {
store := ctx.KVStore(k.storeKey)

Expand All @@ -249,7 +249,7 @@ func (k *Keeper) UpdateSigner(ctx sdk.Context, newSigner hmTypes.HeimdallAddress
// get old validator from state and make power 0
validator, err := k.GetValidatorInfo(ctx, prevSigner.Bytes())
if err != nil {
k.Logger(ctx).Error("Unable to fetch valiator from store")
k.Logger(ctx).Error("Unable to fetch validator from store")
return err
}

Expand Down Expand Up @@ -425,7 +425,7 @@ func (k *Keeper) GetStakingSequences(ctx sdk.Context) (sequences []string) {
return
}

// IterateStakingSequencesAndApplyFn interate validators and apply the given function.
// IterateStakingSequencesAndApplyFn iterate validators and apply the given function.
func (k *Keeper) IterateStakingSequencesAndApplyFn(ctx sdk.Context, f func(sequence string) error) {
store := ctx.KVStore(k.storeKey)

Expand Down Expand Up @@ -456,7 +456,7 @@ func (k *Keeper) Slash(ctx sdk.Context, valSlashingInfo hmTypes.ValidatorSlashin
// get validator from state
validator, found := k.GetValidatorFromValID(ctx, valSlashingInfo.ID)
if !found {
k.Logger(ctx).Error("Unable to fetch valiator from store")
k.Logger(ctx).Error("Unable to fetch validator from store")
return errors.New("validator not found")
}

Expand Down Expand Up @@ -489,7 +489,7 @@ func (k *Keeper) Unjail(ctx sdk.Context, valID hmTypes.ValidatorID) {
// get validator from state and make jailed = false
validator, found := k.GetValidatorFromValID(ctx, valID)
if !found {
k.Logger(ctx).Error("Unable to fetch valiator from store")
k.Logger(ctx).Error("Unable to fetch validator from store")
return
}

Expand Down
2 changes: 1 addition & 1 deletion staking/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (suite *KeeperTestSuite) TestValidator() {
}

// Check if Validator matches in state
require.Equal(t, valInfo, *validators[valId], "Validators in state doesnt match")
require.Equal(t, valInfo, *validators[valId], "Validators in state doesn't match")
require.Equal(t, types.HexToHeimdallAddress(mappedSignerAddress.Hex()), validators[0].Signer, "Signer address doesn't match")
}

Expand Down
2 changes: 1 addition & 1 deletion topup/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (keeper *Keeper) GetTopupSequences(ctx sdk.Context) (sequences []string) {
return
}

// IterateTopupSequencesAndApplyFn interate validators and apply the given function.
// IterateTopupSequencesAndApplyFn iterate validators and apply the given function.
func (keeper *Keeper) IterateTopupSequencesAndApplyFn(ctx sdk.Context, f func(sequence string) error) {
store := ctx.KVStore(keeper.key)

Expand Down
2 changes: 1 addition & 1 deletion types/simulation/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (acc Account) Equals(acc2 Account) bool {
return acc.Address.Equals(acc2.Address)
}

// RandomAcc picks and returns a random account from an array and returs its
// RandomAcc picks and returns a random account from an array and returns its
// position in the array.
func RandomAcc(r *rand.Rand, accs []Account) (Account, int) {
idx := r.Intn(len(accs))
Expand Down
2 changes: 1 addition & 1 deletion types/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (v *Validator) IsCurrentValidator(ackCount uint64) bool {
// current epoch will be ack count + 1
currentEpoch := ackCount + 1

// validator hasnt initialised unstake
// validator hasn't initialised unstake
if !v.Jailed && v.StartEpoch <= currentEpoch && (v.EndEpoch == 0 || v.EndEpoch > currentEpoch) && v.VotingPower > 0 {
return true
}
Expand Down

0 comments on commit 7b7262a

Please sign in to comment.