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

refactor(serverv2): remove unused AppI interface #20941

Merged
merged 1 commit into from
Jul 13, 2024
Merged
Changes from all commits
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
21 changes: 0 additions & 21 deletions runtime/v2/app.go
Original file line number Diff line number Diff line change
@@ -1,42 +1,21 @@
package runtime

import (
"context"
"encoding/json"
"errors"

"golang.org/x/exp/slices"

runtimev2 "cosmossdk.io/api/cosmos/app/runtime/v2"
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
coreappmanager "cosmossdk.io/core/app"
"cosmossdk.io/core/legacy"
"cosmossdk.io/core/log"
"cosmossdk.io/core/registry"
"cosmossdk.io/core/store"
"cosmossdk.io/core/transaction"
"cosmossdk.io/server/v2/appmanager"
"cosmossdk.io/server/v2/stf"
)

var _ AppI[transaction.Tx] = (*App[transaction.Tx])(nil)

// AppI is an interface that defines the methods required by the App.
type AppI[T transaction.Tx] interface {
DeliverBlock(
ctx context.Context,
block *coreappmanager.BlockRequest[T],
) (*coreappmanager.BlockResponse, store.WriterMap, error)
ValidateTx(ctx context.Context, tx T) (coreappmanager.TxResult, error)
Simulate(ctx context.Context, tx T) (coreappmanager.TxResult, store.WriterMap, error)
Query(ctx context.Context, version uint64, request transaction.Msg) (transaction.Msg, error)
QueryWithState(ctx context.Context, state store.ReaderMap, request transaction.Msg) (transaction.Msg, error)

Logger() log.Logger
ModuleManager() *MM[T]
Close() error
}

// App is a wrapper around AppManager and ModuleManager that can be used in hybrid
// app.go/app config scenarios or directly as a servertypes.Application instance.
// To get an instance of *App, *AppBuilder must be requested as a dependency
Expand Down
Loading