From 233a229cabf0599aed91b6b6697c268753731b2c Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Tue, 26 Jul 2022 16:16:56 -0500 Subject: [PATCH] feat: add new abci++ methods --- baseapp/abci.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/baseapp/abci.go b/baseapp/abci.go index 2434961d098e..6982f1aad882 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -304,6 +304,25 @@ func (app *BaseApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx } } +// PreprocessTxs fullfills the celestia-core version of the ACBI interface. It +// allows for arbitrary processing steps before transaction data is included in +// the block. +func (app *BaseApp) PrepareProposal(req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { + // TODO(evan): fully implement + // pass through txs w/o processing for now + return abci.ResponsePrepareProposal{ + BlockData: req.BlockData, + } +} + +// ProcessProposal fulfills the celestia-core version of the ABCI++ interface. +// It allows for arbitrary processing to occur after recieving a proposal block +func (app *BaseApp) ProcessProposal(req abci.RequestProcessProposal) abci.ResponseProcessProposal { + return abci.ResponseProcessProposal{ + Result: abci.ResponseProcessProposal_ACCEPT, + } +} + // Commit implements the ABCI interface. It will commit all state that exists in // the deliver state's multi-store and includes the resulting commit ID in the // returned abci.ResponseCommit. Commit will set the check state based on the