Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouxing committed Nov 12, 2023
1 parent a44e93a commit b3dbacc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 0 additions & 2 deletions x/bitcoincommiter/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ func NewKeeper(
storeKey,
memKey storetypes.StoreKey,
ps paramtypes.Subspace,


) *Keeper {
// set KeyTable if it has not already been set
if !ps.HasKeyTable() {
Expand Down
19 changes: 13 additions & 6 deletions x/bitcoincommiter/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ func (AppModuleBasic) Name() string {
return types.ModuleName

Check warning on line 44 in x/bitcoincommiter/module.go

View check run for this annotation

Codecov / codecov/patch

x/bitcoincommiter/module.go#L43-L44

Added lines #L43 - L44 were not covered by tests
}

// RegisterLegacyAminoCodec registers the amino codec for the module, which is used to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore
// RegisterLegacyAminoCodec registers the amino codec for the module,
// which is used to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
types.RegisterCodec(cdc)

Check warning on line 50 in x/bitcoincommiter/module.go

View check run for this annotation

Codecov / codecov/patch

x/bitcoincommiter/module.go#L49-L50

Added lines #L49 - L50 were not covered by tests
}
Expand All @@ -54,7 +55,8 @@ func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) {
types.RegisterInterfaces(reg)

Check warning on line 55 in x/bitcoincommiter/module.go

View check run for this annotation

Codecov / codecov/patch

x/bitcoincommiter/module.go#L54-L55

Added lines #L54 - L55 were not covered by tests
}

// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. The default GenesisState need to be defined by the module developer and is primarily used for testing
// DefaultGenesis returns a default GenesisState for the module,
// marshalled to json.RawMessage. The default GenesisState need to be defined by the module developer and is primarily used for testing
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
return cdc.MustMarshalJSON(types.DefaultGenesis())

Check warning on line 61 in x/bitcoincommiter/module.go

View check run for this annotation

Codecov / codecov/patch

x/bitcoincommiter/module.go#L60-L61

Added lines #L60 - L61 were not covered by tests
}
Expand All @@ -75,12 +77,14 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r
}
}

// GetTxCmd returns the root Tx command for the module. The subcommands of this root command are used by end-users to generate new transactions containing messages defined in the module
// GetTxCmd returns the root Tx command for the module.
// The subcommands of this root command are used by end-users to generate new transactions containing messages defined in the module
func (a AppModuleBasic) GetTxCmd() *cobra.Command {
return cli.GetTxCmd()

Check warning on line 83 in x/bitcoincommiter/module.go

View check run for this annotation

Codecov / codecov/patch

x/bitcoincommiter/module.go#L82-L83

Added lines #L82 - L83 were not covered by tests
}

// GetQueryCmd returns the root query command for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module
// GetQueryCmd returns the root query command for the module.
// The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module
func (AppModuleBasic) GetQueryCmd() *cobra.Command {
return cli.GetQueryCmd(types.StoreKey)

Check warning on line 89 in x/bitcoincommiter/module.go

View check run for this annotation

Codecov / codecov/patch

x/bitcoincommiter/module.go#L88-L89

Added lines #L88 - L89 were not covered by tests
}
Expand Down Expand Up @@ -129,7 +133,8 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)

Check warning on line 133 in x/bitcoincommiter/module.go

View check run for this annotation

Codecov / codecov/patch

x/bitcoincommiter/module.go#L131-L133

Added lines #L131 - L133 were not covered by tests
}

// RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted)
// RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value,
// the InvariantRegistry triggers appropriate logic (most often the chain will be halted)
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

Check warning on line 138 in x/bitcoincommiter/module.go

View check run for this annotation

Codecov / codecov/patch

x/bitcoincommiter/module.go#L138

Added line #L138 was not covered by tests

// InitGenesis performs the module's genesis initialization. It returns no validator updates.
Expand All @@ -149,7 +154,9 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(genState)

Check warning on line 154 in x/bitcoincommiter/module.go

View check run for this annotation

Codecov / codecov/patch

x/bitcoincommiter/module.go#L152-L154

Added lines #L152 - L154 were not covered by tests
}

// ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1
// ConsensusVersion is a sequence number for state-breaking change of the module.
// It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions,
// the initial version should be set to 1
func (AppModule) ConsensusVersion() uint64 { return 1 }

Check warning on line 160 in x/bitcoincommiter/module.go

View check run for this annotation

Codecov / codecov/patch

x/bitcoincommiter/module.go#L160

Added line #L160 was not covered by tests

// BeginBlock contains the logic that is automatically triggered at the beginning of each block
Expand Down

0 comments on commit b3dbacc

Please sign in to comment.