diff --git a/tests/integration/tx/context_test.go b/tests/integration/tx/context_test.go index 08124b79e3..eb6ce32501 100644 --- a/tests/integration/tx/context_test.go +++ b/tests/integration/tx/context_test.go @@ -3,16 +3,18 @@ package tx import ( "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" "cosmossdk.io/log" _ "cosmossdk.io/x/accounts" "cosmossdk.io/x/tx/signing" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/tests/integration/tx/internal" "github.com/cosmos/cosmos-sdk/tests/integration/tx/internal/pulsar/testpb" "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - "github.com/stretchr/testify/require" ) func ProvideCustomGetSigner() signing.CustomGetSigner { diff --git a/tests/integration/tx/internal/util.go b/tests/integration/tx/internal/util.go index e3f6a58289..d2e654a588 100644 --- a/tests/integration/tx/internal/util.go +++ b/tests/integration/tx/internal/util.go @@ -6,6 +6,7 @@ import ( "encoding/json" "testing" + gogoproto "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" @@ -26,7 +27,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/cosmos/cosmos-sdk/x/auth/tx" - gogoproto "github.com/cosmos/gogoproto/proto" ) var TestRepeatedFieldsSigner = signing.CustomGetSigner{ diff --git a/x/epochs/README.md b/x/epochs/README.md index dcd7eb7b51..7b0b0b2857 100644 --- a/x/epochs/README.md +++ b/x/epochs/README.md @@ -68,22 +68,6 @@ The `epochs` module emits the following events: Epochs keeper module provides utility functions to manage epochs. -``` go -// Keeper is the interface for epochs module keeper -type Keeper interface { - // GetEpochInfo returns epoch info by identifier - GetEpochInfo(ctx sdk.Context, identifier string) types.EpochInfo - // SetEpochInfo set epoch info - SetEpochInfo(ctx sdk.Context, epoch types.EpochInfo) - // DeleteEpochInfo delete epoch info - DeleteEpochInfo(ctx sdk.Context, identifier string) - // IterateEpochInfo iterate through epochs - IterateEpochInfo(ctx sdk.Context, fn func(index int64, epochInfo types.EpochInfo) (stop bool)) - // Get all epoch infos - AllEpochInfos(ctx sdk.Context) []types.EpochInfo -} -``` - ## Hooks ```go diff --git a/x/epochs/keeper/epoch.go b/x/epochs/keeper/epoch.go index 3943cf4c61..c655dac548 100644 --- a/x/epochs/keeper/epoch.go +++ b/x/epochs/keeper/epoch.go @@ -5,8 +5,15 @@ import ( "fmt" "cosmossdk.io/x/epochs/types" + + sdk "github.com/cosmos/cosmos-sdk/types" ) +// GetEpochInfo returns epoch info by identifier. +func (k Keeper) GetEpochInfo(ctx sdk.Context, identifier string) (types.EpochInfo, error) { + return k.EpochInfo.Get(ctx, identifier) +} + // AddEpochInfo adds a new epoch info. Will return an error if the epoch fails validation, // or re-uses an existing identifier. // This method also sets the start time if left unset, and sets the epoch start height.