From 03ba45412cff8c16fb2c3dc51d01dd10b89d68bb Mon Sep 17 00:00:00 2001 From: Matt Kocubinski Date: Tue, 5 Nov 2024 10:36:27 -0600 Subject: [PATCH] maybe fix BaseApp assumptions? --- baseapp/abci.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/baseapp/abci.go b/baseapp/abci.go index 979089c5c86d..92629da30cc3 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -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