github.com/cosmos/cosmos-sdk@v0.50.10/server/cmt_abci.go (about) 1 package server 2 3 import ( 4 "context" 5 6 abci "github.com/cometbft/cometbft/abci/types" 7 8 servertypes "github.com/cosmos/cosmos-sdk/server/types" 9 ) 10 11 type cometABCIWrapper struct { 12 app servertypes.ABCI 13 } 14 15 func NewCometABCIWrapper(app servertypes.ABCI) abci.Application { 16 return cometABCIWrapper{app: app} 17 } 18 19 func (w cometABCIWrapper) Info(_ context.Context, req *abci.RequestInfo) (*abci.ResponseInfo, error) { 20 return w.app.Info(req) 21 } 22 23 func (w cometABCIWrapper) Query(ctx context.Context, req *abci.RequestQuery) (*abci.ResponseQuery, error) { 24 return w.app.Query(ctx, req) 25 } 26 27 func (w cometABCIWrapper) CheckTx(_ context.Context, req *abci.RequestCheckTx) (*abci.ResponseCheckTx, error) { 28 return w.app.CheckTx(req) 29 } 30 31 func (w cometABCIWrapper) InitChain(_ context.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { 32 return w.app.InitChain(req) 33 } 34 35 func (w cometABCIWrapper) PrepareProposal(_ context.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) { 36 return w.app.PrepareProposal(req) 37 } 38 39 func (w cometABCIWrapper) ProcessProposal(_ context.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) { 40 return w.app.ProcessProposal(req) 41 } 42 43 func (w cometABCIWrapper) FinalizeBlock(_ context.Context, req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) { 44 return w.app.FinalizeBlock(req) 45 } 46 47 func (w cometABCIWrapper) ExtendVote(ctx context.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) { 48 return w.app.ExtendVote(ctx, req) 49 } 50 51 func (w cometABCIWrapper) VerifyVoteExtension(_ context.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { 52 return w.app.VerifyVoteExtension(req) 53 } 54 55 func (w cometABCIWrapper) Commit(_ context.Context, _ *abci.RequestCommit) (*abci.ResponseCommit, error) { 56 return w.app.Commit() 57 } 58 59 func (w cometABCIWrapper) ListSnapshots(_ context.Context, req *abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error) { 60 return w.app.ListSnapshots(req) 61 } 62 63 func (w cometABCIWrapper) OfferSnapshot(_ context.Context, req *abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error) { 64 return w.app.OfferSnapshot(req) 65 } 66 67 func (w cometABCIWrapper) LoadSnapshotChunk(_ context.Context, req *abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error) { 68 return w.app.LoadSnapshotChunk(req) 69 } 70 71 func (w cometABCIWrapper) ApplySnapshotChunk(_ context.Context, req *abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error) { 72 return w.app.ApplySnapshotChunk(req) 73 }