From b28cc47c1d46398b4b150d56688d6ecc153c4dcd Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Wed, 30 Nov 2022 16:05:13 +0000 Subject: [PATCH] Renaming variable SubmoduleName to ModuleName in 07-tendermint (#2852) --- modules/light-clients/07-tendermint/errors.go | 30 ++++++++----------- modules/light-clients/07-tendermint/keys.go | 5 ++++ modules/light-clients/07-tendermint/module.go | 2 +- 3 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 modules/light-clients/07-tendermint/keys.go diff --git a/modules/light-clients/07-tendermint/errors.go b/modules/light-clients/07-tendermint/errors.go index 2839beb5291..7e2b37e59b2 100644 --- a/modules/light-clients/07-tendermint/errors.go +++ b/modules/light-clients/07-tendermint/errors.go @@ -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") ) diff --git a/modules/light-clients/07-tendermint/keys.go b/modules/light-clients/07-tendermint/keys.go new file mode 100644 index 00000000000..e2e31b377fb --- /dev/null +++ b/modules/light-clients/07-tendermint/keys.go @@ -0,0 +1,5 @@ +package tendermint + +const ( + ModuleName = "tendermint-client" +) diff --git a/modules/light-clients/07-tendermint/module.go b/modules/light-clients/07-tendermint/module.go index 653c7098a8c..c66bc36102d 100644 --- a/modules/light-clients/07-tendermint/module.go +++ b/modules/light-clients/07-tendermint/module.go @@ -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.