Skip to content

Commit

Permalink
chore: spelling errors fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-merge-queue[bot] authored and github-actions[bot] committed May 9, 2024
1 parent 3328e9b commit db41e30
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion proto/interchain_security/ccv/provider/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ service Msg {
rpc AssignConsumerKey(MsgAssignConsumerKey) returns (MsgAssignConsumerKeyResponse);
rpc SubmitConsumerMisbehaviour(MsgSubmitConsumerMisbehaviour) returns (MsgSubmitConsumerMisbehaviourResponse);
rpc SubmitConsumerDoubleVoting(MsgSubmitConsumerDoubleVoting) returns (MsgSubmitConsumerDoubleVotingResponse);
rpc OptIn(MsgOptIn) returns (MsgOptInResponse);
rpc option(MsgOptIn) returns (MsgOptInResponse);
rpc OptOut(MsgOptOut) returns (MsgOptOutResponse);
rpc SetConsumerCommissionRate(MsgSetConsumerCommissionRate) returns (MsgSetConsumerCommissionRateResponse);
}
Expand Down
12 changes: 6 additions & 6 deletions tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -2274,7 +2274,7 @@ type OptInAction struct {
Validator ValidatorID
}

func (tr TestConfig) optIn(action OptInAction, target ExecutionTarget, verbose bool) {
func (tr TestConfig) option(action OptInAction, target ExecutionTarget, verbose bool) {
// Note: to get error response reported back from this command '--gas auto' needs to be set.
gas := "auto"
// Unfortunately, --gas auto does not work with CometMock. so when using CometMock, just use --gas 9000000 then
Expand All @@ -2283,7 +2283,7 @@ func (tr TestConfig) optIn(action OptInAction, target ExecutionTarget, verbose b
}

// Use: "opt-in [consumer-chain-id] [consumer-pubkey]",
optIn := fmt.Sprintf(
option := fmt.Sprintf(
`%s tx provider opt-in %s --from validator%s --chain-id %s --home %s --node %s --gas %s --keyring-backend test -y -o json`,
tr.chainConfigs[ChainID("provi")].BinaryName,
string(tr.chainConfigs[action.Chain].ChainId),
Expand All @@ -2296,11 +2296,11 @@ func (tr TestConfig) optIn(action OptInAction, target ExecutionTarget, verbose b

cmd := target.ExecCommand(
"/bin/bash", "-c",
optIn,
option,
)

if verbose {
fmt.Println("optIn cmd:", cmd.String())
fmt.Println("option cmd:", cmd.String())
}

bz, err := cmd.CombinedOutput()
Expand Down Expand Up @@ -2333,7 +2333,7 @@ func (tr TestConfig) optOut(action OptOutAction, target ExecutionTarget, verbose
}

// Use: "opt-out [consumer-chain-id]",
optIn := fmt.Sprintf(
option := fmt.Sprintf(
`%s tx provider opt-out %s --from validator%s --chain-id %s --home %s --node %s --gas %s --keyring-backend test -y -o json`,
tr.chainConfigs[ChainID("provi")].BinaryName,
string(tr.chainConfigs[action.Chain].ChainId),
Expand All @@ -2346,7 +2346,7 @@ func (tr TestConfig) optOut(action OptOutAction, target ExecutionTarget, verbose

cmd := target.ExecCommand(
"/bin/bash", "-c",
optIn,
option,
)

if verbose {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/steps_partial_set_security.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func stepsOptInChain() []Step {
},
// Οpt in "alice" and "bob" so the chain is not empty when it is about to start. Note, that "alice" and "bob" use
// the provider's public key (see `UseConsumerKey` is set to `false` in `getDefaultValidators`) and hence do not
// need a consumer-key assigment.
// need a consumer-key assignment.
{
Action: OptInAction{
Chain: ChainID("consu"),
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (td *DefaultDriver) runAction(action interface{}) error {
case SubmitChangeRewardDenomsProposalAction:
td.testCfg.submitChangeRewardDenomsProposal(action, td.target, td.verbose)
case OptInAction:
td.testCfg.optIn(action, td.target, td.verbose)
td.testCfg.option(action, td.target, td.verbose)
case OptOutAction:
td.testCfg.optOut(action, td.target, td.verbose)
default:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ func (s *CCVTestSuite) TestMultiConsumerRewardsDistribution() {
bundle.GetCtx(),
accountKeeper.GetModuleAccount(bundle.GetCtx(), consumertypes.ConsumerToSendToProviderName).GetAddress(),
)
s.Require().Len(pool, 1, "consumer reward pool cannot have mutiple token denoms")
s.Require().Len(pool, 1, "consumer reward pool cannot have multiple token denoms")
rewardsPerConsumer = pool[0]
}

Expand Down
2 changes: 1 addition & 1 deletion tests/mbt/model/ccv_pss.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module ccv_pss {
// Opts a validator in for a consumer chain the provider.
// Possible before the consumer chain starts running,
// and will then be applied when the consumer chain starts running.
pure def OptIn(currentState: ProtocolState, consumer: Chain, validator: Node): Result = {
pure def option(currentState: ProtocolState, consumer: Chain, validator: Node): Result = {
pure val optedInVals = currentState.providerState.optedInVals.get(consumer)
pure val newOptedInVals = optedInVals.union(Set(validator))
Ok({
Expand Down
6 changes: 3 additions & 3 deletions tests/mbt/model/ccv_pss_model.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ module ccv_pss_model {
}

action OptIn_Deterministic(consumer: Chain, validator: Node): bool = {
val res = OptIn(currentState, consumer, validator)
val res = option(currentState, consumer, validator)
all {
currentState' = res.newState,
trace' = trace.append(
{
...emptyAction,
kind: "OptIn",
kind: "option",
consumerChain: consumer,
validator: validator
}
Expand Down Expand Up @@ -83,7 +83,7 @@ module ccv_pss_model {

val CanOptIn = {
not(
trace[length(trace)-1].kind == "OptIn"
trace[length(trace)-1].kind == "option"
and
trace[length(trace)-1].expectedError == ""
)
Expand Down
2 changes: 1 addition & 1 deletion x/ccv/provider/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewHandler(k *keeper.Keeper) sdk.Handler {
res, err := msgServer.SubmitConsumerDoubleVoting(sdk.WrapSDKContext(ctx), msg)
return sdk.WrapServiceResult(ctx, res, err)
case *types.MsgOptIn:
res, err := msgServer.OptIn(sdk.WrapSDKContext(ctx), msg)
res, err := msgServer.option(sdk.WrapSDKContext(ctx), msg)
return sdk.WrapServiceResult(ctx, res, err)
case *types.MsgOptOut:
res, err := msgServer.OptOut(sdk.WrapSDKContext(ctx), msg)
Expand Down
2 changes: 1 addition & 1 deletion x/ccv/provider/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (k msgServer) SubmitConsumerDoubleVoting(goCtx context.Context, msg *types.
return &types.MsgSubmitConsumerDoubleVotingResponse{}, nil
}

func (k msgServer) OptIn(goCtx context.Context, msg *types.MsgOptIn) (*types.MsgOptInResponse, error) {
func (k msgServer) option(goCtx context.Context, msg *types.MsgOptIn) (*types.MsgOptInResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

valAddress, err := sdk.ValAddressFromBech32(msg.ProviderAddr)
Expand Down

0 comments on commit db41e30

Please sign in to comment.