chore: cleanup core/app (#21368)
This commit is contained in:
@@ -9,15 +9,23 @@ import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
_ "cosmossdk.io/api/amino" // Import amino.proto file for reflection
|
||||
appmanager "cosmossdk.io/core/app"
|
||||
"cosmossdk.io/core/server"
|
||||
"cosmossdk.io/core/transaction"
|
||||
)
|
||||
|
||||
// protocdc defines the interface for marshaling and unmarshaling messages in server/v2
|
||||
type protocdc interface {
|
||||
Marshal(v transaction.Msg) ([]byte, error)
|
||||
Unmarshal(data []byte, v transaction.Msg) error
|
||||
Name() string
|
||||
}
|
||||
|
||||
type protoCodec struct {
|
||||
interfaceRegistry appmanager.InterfaceRegistry
|
||||
interfaceRegistry server.InterfaceRegistry
|
||||
}
|
||||
|
||||
// newProtoCodec returns a reference to a new ProtoCodec
|
||||
func newProtoCodec(interfaceRegistry appmanager.InterfaceRegistry) *protoCodec {
|
||||
func newProtoCodec(interfaceRegistry server.InterfaceRegistry) *protoCodec {
|
||||
return &protoCodec{
|
||||
interfaceRegistry: interfaceRegistry,
|
||||
}
|
||||
@@ -62,7 +70,7 @@ func (pc *protoCodec) GRPCCodec() encoding.Codec {
|
||||
|
||||
// grpcProtoCodec is the implementation of the gRPC proto codec.
|
||||
type grpcProtoCodec struct {
|
||||
cdc appmanager.ProtoCodec
|
||||
cdc protocdc
|
||||
}
|
||||
|
||||
var errUnknownProtoType = errors.New("codec: unknown proto type") // sentinel error
|
||||
|
||||
Reference in New Issue
Block a user