From c73480994f22b6025be814ec2188ba993026cc59 Mon Sep 17 00:00:00 2001 From: Hieu Vu <72878483+hieuvubk@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:39:25 +0700 Subject: [PATCH] fix interface types --- server/v2/cometbft/handlers/handlers.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/v2/cometbft/handlers/handlers.go b/server/v2/cometbft/handlers/handlers.go index 0354a4a497af..9008490f6a44 100644 --- a/server/v2/cometbft/handlers/handlers.go +++ b/server/v2/cometbft/handlers/handlers.go @@ -4,7 +4,6 @@ import ( "context" abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" - "github.com/cosmos/gogoproto/proto" "cosmossdk.io/core/store" "cosmossdk.io/core/transaction" @@ -13,11 +12,11 @@ import ( type ( // PrepareHandler passes in the list of Txs that are being proposed. The app can then do stateful operations // over the list of proposed transactions. It can return a modified list of txs to include in the proposal. - PrepareHandler[T transaction.Tx] func(context.Context, AppManager[T], []T, proto.Message) ([]T, error) + PrepareHandler[T transaction.Tx] func(context.Context, AppManager[T], transaction.Codec[T], *abci.PrepareProposalRequest) ([]T, error) // ProcessHandler is a function that takes a list of transactions and returns a boolean and an error. // If the verification of a transaction fails, the boolean is false and the error is non-nil. - ProcessHandler[T transaction.Tx] func(context.Context, AppManager[T], []T, proto.Message) error + ProcessHandler[T transaction.Tx] func(context.Context, AppManager[T], transaction.Codec[T], *abci.ProcessProposalRequest) error // VerifyVoteExtensionhandler is a function type that handles the verification of a vote extension request. // It takes a context, a store reader map, and a request to verify a vote extension.