Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: minor cleanup of types #13430

Merged
merged 4 commits into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions testutil/mock/types_router.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 0 additions & 26 deletions types/errors/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
)

// ResponseCheckTx returns an ABCI ResponseCheckTx object with fields filled in
// from the given error and gas values.
func ResponseCheckTx(err error, gw, gu uint64, debug bool) abci.ResponseCheckTx {
space, code, log := ABCIInfo(err, debug)
return abci.ResponseCheckTx{
Codespace: space,
Code: code,
Log: log,
GasWanted: int64(gw),
GasUsed: int64(gu),
}
}

// ResponseCheckTxWithEvents returns an ABCI ResponseCheckTx object with fields filled in
// from the given error, gas values and events.
func ResponseCheckTxWithEvents(err error, gw, gu uint64, events []abci.Event, debug bool) abci.ResponseCheckTx {
Expand All @@ -31,19 +18,6 @@ func ResponseCheckTxWithEvents(err error, gw, gu uint64, events []abci.Event, de
}
}

// ResponseDeliverTx returns an ABCI ResponseDeliverTx object with fields filled in
// from the given error and gas values.
func ResponseDeliverTx(err error, gw, gu uint64, debug bool) abci.ResponseDeliverTx {
tac0turtle marked this conversation as resolved.
Show resolved Hide resolved
space, code, log := ABCIInfo(err, debug)
return abci.ResponseDeliverTx{
Codespace: space,
Code: code,
Log: log,
GasWanted: int64(gw),
GasUsed: int64(gu),
}
}

// ResponseDeliverTxWithEvents returns an ABCI ResponseDeliverTx object with fields filled in
// from the given error, gas values and events.
func ResponseDeliverTxWithEvents(err error, gw, gu uint64, events []abci.Event, debug bool) abci.ResponseDeliverTx {
Expand Down
235 changes: 0 additions & 235 deletions types/kv/list.go

This file was deleted.

3 changes: 0 additions & 3 deletions types/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@ func (GenesisOnlyAppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}
// QuerierRoute returns an empty module querier route
func (GenesisOnlyAppModule) QuerierRoute() string { return "" }

// LegacyQuerierHandler returns an empty module querier
tac0turtle marked this conversation as resolved.
Show resolved Hide resolved
func (gam GenesisOnlyAppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { return nil }

// RegisterServices registers all services.
func (gam GenesisOnlyAppModule) RegisterServices(Configurator) {}

Expand Down
9 changes: 0 additions & 9 deletions types/queryable.go

This file was deleted.

6 changes: 0 additions & 6 deletions types/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,3 @@ var (
// characters only.
IsNumeric = regexp.MustCompile(`^[0-9]+$`).MatchString
)

// QueryRouter provides queryables for each query path.
type QueryRouter interface {
AddRoute(r string, h Querier) QueryRouter
Route(path string) Querier
}
3 changes: 1 addition & 2 deletions x/evidence/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ func testEquivocationHandler(_ interface{}) types.Handler {
type KeeperTestSuite struct {
suite.Suite

ctx sdk.Context
querier sdk.Querier
ctx sdk.Context

evidenceKeeper keeper.Keeper
bankKeeper *evidencetestutil.MockBankKeeper
Expand Down
5 changes: 0 additions & 5 deletions x/feegrant/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ func (AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
feegrant.RegisterInterfaces(registry)
}

// LegacyQuerierHandler returns the feegrant module sdk.Querier.
func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier {
return nil
}

// DefaultGenesis returns default genesis state as raw bytes for the feegrant
// module.
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
Expand Down