Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Oct 17, 2024
1 parent 61f7539 commit d6cd414
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/v2/api/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (s *Server[T]) StartCmdFlags() *pflag.FlagSet {
}

func makeUnknownServiceHandler(handlers map[string]appmodulev2.Handler, querier interface {
Query(ctx context.Context, version uint64, msg gogoproto.Message) (gogoproto.Message, error)
Query(ctx context.Context, version uint64, msg transaction.Msg) (transaction.Msg, error)
},
) grpc.StreamHandler {
getRegistry := sync.OnceValues(gogoproto.MergedRegistry)
Expand Down
3 changes: 2 additions & 1 deletion server/v2/cometbft/abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,8 @@ func setUpConsensus(t *testing.T, gasLimit uint64, mempool mempool.Mempool[mock.
am := appmanager.New(appmanager.Config{
ValidateTxGasLimit: gasLimit,
QueryGasLimit: gasLimit,
SimulationGasLimit: gasLimit},
SimulationGasLimit: gasLimit,
},
mockStore,
s,
func(ctx context.Context, src io.Reader, txHandler func(json.RawMessage) error) (store.WriterMap, error) {
Expand Down
6 changes: 6 additions & 0 deletions server/v2/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
serverv2 "cosmossdk.io/server/v2"
grpc "cosmossdk.io/server/v2/api/grpc"
"cosmossdk.io/server/v2/store"
storev2 "cosmossdk.io/store/v2"
)

type mockInterfaceRegistry struct{}
Expand All @@ -38,10 +39,15 @@ type mockApp[T transaction.Tx] struct {
func (*mockApp[T]) QueryHandlers() map[string]appmodulev2.Handler {
return map[string]appmodulev2.Handler{}
}

func (*mockApp[T]) InterfaceRegistry() coreserver.InterfaceRegistry {
return &mockInterfaceRegistry{}
}

func (*mockApp[T]) Store() storev2.RootStore {
return nil
}

func TestServer(t *testing.T) {
currentDir, err := os.Getwd()
require.NoError(t, err)
Expand Down

0 comments on commit d6cd414

Please sign in to comment.