Skip to content

Commit

Permalink
feat: export baseapp.SetDeliverState
Browse files Browse the repository at this point in the history
  • Loading branch information
johnletey committed Mar 13, 2024
1 parent cfc1dbb commit 4716abc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC
}

// initialize the deliver state and check state with a correct header
app.setDeliverState(initHeader)
app.SetDeliverState(initHeader)
app.setCheckState(initHeader)

// Store the consensus params in the BaseApp's paramstore. Note, this must be
Expand Down Expand Up @@ -141,7 +141,7 @@ func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeg
// already be initialized in InitChain. Otherwise app.DeliverState will be
// nil, since it is reset on Commit.
if app.DeliverState == nil {
app.setDeliverState(req.Header)
app.SetDeliverState(req.Header)
} else {
// In the first block, app.DeliverState.ctx will already be initialized
// by InitChain. Context is now updated with Header information.
Expand Down
4 changes: 2 additions & 2 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,11 @@ func (app *BaseApp) setCheckState(header tmproto.Header) {
}
}

// setDeliverState sets the BaseApp's DeliverState with a branched multi-store
// SetDeliverState sets the BaseApp's DeliverState with a branched multi-store
// (i.e. a CacheMultiStore) and a new Context with the same multi-store branch,
// and provided header. It is set on InitChain and BeginBlock and set to nil on
// Commit.
func (app *BaseApp) setDeliverState(header tmproto.Header) {
func (app *BaseApp) SetDeliverState(header tmproto.Header) {
ms := app.cms.CacheMultiStore()
app.DeliverState = &state{
ms: ms,
Expand Down

0 comments on commit 4716abc

Please sign in to comment.