From 45e6bb534d170372cde80cc67090fc05ef0c93f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 29 Nov 2022 13:27:50 +0100 Subject: [PATCH] chore: improve godoc for module.go --- modules/light-clients/06-solomachine/module.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/light-clients/06-solomachine/module.go b/modules/light-clients/06-solomachine/module.go index c3d969f5fc8..a7272f1faf5 100644 --- a/modules/light-clients/06-solomachine/module.go +++ b/modules/light-clients/06-solomachine/module.go @@ -14,6 +14,8 @@ import ( var _ module.AppModuleBasic = AppModuleBasic{} // AppModuleBasic defines the basic application module used by the solo machine light client. +// Only the RegisterInterfaces function needs to be implemented. All other function perform +// a no-op. type AppModuleBasic struct{} // Name returns the solo machine module name. @@ -21,20 +23,21 @@ func (AppModuleBasic) Name() string { return SubModuleName } -// RegisterLegacyAminoCodec does nothing. The solo machine client does not support amino. +// RegisterLegacyAminoCodec performs a no-op. The solo machine client does not support amino. func (AppModuleBasic) RegisterLegacyAminoCodec(*codec.LegacyAmino) {} -// RegisterInterfaces registers module concrete types into protobuf Any. +// RegisterInterfaces registers module concrete types into protobuf Any. This allows core IBC +// to unmarshal solo machine types. func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { RegisterInterfaces(registry) } -// DefaultGenesis returns nil +// DefaultGenesis performs a no-op. Genesis is not supported for solo machine. func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return nil } -// ValidateGenesis return nil +// ValidateGenesis performs a no-op. Genesis is not supported for solo machine. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { return nil } @@ -42,12 +45,12 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod // RegisterGRPCGatewayRoutes performs a no-op. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {} -// GetTxCmd returns nil. +// GetTxCmd performs a no-op. Please see the 02-client cli commands. func (AppModuleBasic) GetTxCmd() *cobra.Command { return nil } -// GetQueryCmd returns nil. +// GetQueryCmd performs a no-op. Please see the 02-client cli commands. func (AppModuleBasic) GetQueryCmd() *cobra.Command { return nil }