Skip to content

Commit

Permalink
Renaming variable SubmoduleName to ModuleName in 07-tendermint (#2852)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Nov 30, 2022
1 parent 9040647 commit b28cc47
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
30 changes: 13 additions & 17 deletions modules/light-clients/07-tendermint/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

const (
SubModuleName = "tendermint-client"
)

// IBC tendermint client sentinel errors
var (
ErrInvalidChainID = sdkerrors.Register(SubModuleName, 2, "invalid chain-id")
ErrInvalidTrustingPeriod = sdkerrors.Register(SubModuleName, 3, "invalid trusting period")
ErrInvalidUnbondingPeriod = sdkerrors.Register(SubModuleName, 4, "invalid unbonding period")
ErrInvalidHeaderHeight = sdkerrors.Register(SubModuleName, 5, "invalid header height")
ErrInvalidHeader = sdkerrors.Register(SubModuleName, 6, "invalid header")
ErrInvalidMaxClockDrift = sdkerrors.Register(SubModuleName, 7, "invalid max clock drift")
ErrProcessedTimeNotFound = sdkerrors.Register(SubModuleName, 8, "processed time not found")
ErrProcessedHeightNotFound = sdkerrors.Register(SubModuleName, 9, "processed height not found")
ErrDelayPeriodNotPassed = sdkerrors.Register(SubModuleName, 10, "packet-specified delay period has not been reached")
ErrTrustingPeriodExpired = sdkerrors.Register(SubModuleName, 11, "time since latest trusted state has passed the trusting period")
ErrUnbondingPeriodExpired = sdkerrors.Register(SubModuleName, 12, "time since latest trusted state has passed the unbonding period")
ErrInvalidProofSpecs = sdkerrors.Register(SubModuleName, 13, "invalid proof specs")
ErrInvalidValidatorSet = sdkerrors.Register(SubModuleName, 14, "invalid validator set")
ErrInvalidChainID = sdkerrors.Register(ModuleName, 2, "invalid chain-id")
ErrInvalidTrustingPeriod = sdkerrors.Register(ModuleName, 3, "invalid trusting period")
ErrInvalidUnbondingPeriod = sdkerrors.Register(ModuleName, 4, "invalid unbonding period")
ErrInvalidHeaderHeight = sdkerrors.Register(ModuleName, 5, "invalid header height")
ErrInvalidHeader = sdkerrors.Register(ModuleName, 6, "invalid header")
ErrInvalidMaxClockDrift = sdkerrors.Register(ModuleName, 7, "invalid max clock drift")
ErrProcessedTimeNotFound = sdkerrors.Register(ModuleName, 8, "processed time not found")
ErrProcessedHeightNotFound = sdkerrors.Register(ModuleName, 9, "processed height not found")
ErrDelayPeriodNotPassed = sdkerrors.Register(ModuleName, 10, "packet-specified delay period has not been reached")
ErrTrustingPeriodExpired = sdkerrors.Register(ModuleName, 11, "time since latest trusted state has passed the trusting period")
ErrUnbondingPeriodExpired = sdkerrors.Register(ModuleName, 12, "time since latest trusted state has passed the unbonding period")
ErrInvalidProofSpecs = sdkerrors.Register(ModuleName, 13, "invalid proof specs")
ErrInvalidValidatorSet = sdkerrors.Register(ModuleName, 14, "invalid validator set")
)
5 changes: 5 additions & 0 deletions modules/light-clients/07-tendermint/keys.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package tendermint

const (
ModuleName = "tendermint-client"
)
2 changes: 1 addition & 1 deletion modules/light-clients/07-tendermint/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type AppModuleBasic struct{}

// Name returns the tendermint module name.
func (AppModuleBasic) Name() string {
return SubModuleName
return ModuleName
}

// RegisterLegacyAminoCodec performs a no-op. The Tendermint client does not support amino.
Expand Down

0 comments on commit b28cc47

Please sign in to comment.