Skip to content

Commit

Permalink
maybe fix BaseApp assumptions?
Browse files Browse the repository at this point in the history
  • Loading branch information
kocubinski committed Nov 5, 2024
1 parent 05ffc7d commit 03ba454
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,12 @@ func (app *BaseApp) InitChain(req *abci.InitChainRequest) (*abci.InitChainRespon
if app.initialHeight == 0 { // If initial height is 0, set it to 1
app.initialHeight = 1
}
if err := app.cms.SetInitialVersion(app.initialHeight); err != nil {
return nil, err
}

// if req.InitialHeight is > 1, then we set the initial version on all stores
if req.InitialHeight > 1 {
initHeader.Height = req.InitialHeight
if err := app.cms.SetInitialVersion(req.InitialHeight); err != nil {
return nil, err
}
}

// initialize states with a correct header
Expand Down

0 comments on commit 03ba454

Please sign in to comment.