From 20de1e3aa6109e3fde3b34890087af8c8f73bf0d Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Tue, 21 Nov 2023 11:25:46 +0100 Subject: [PATCH] user version instead of the block header version --- baseapp/options.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/baseapp/options.go b/baseapp/options.go index b3d4c20fb6cf..ba29aa977f36 100644 --- a/baseapp/options.go +++ b/baseapp/options.go @@ -112,14 +112,14 @@ func (app *BaseApp) SetVersion(v string) { } // SetAppVersion sets the application's protocol version -func (app *BaseApp) SetAppVersion(ctx sdk.Context, v uint64) { +func (app *BaseApp) SetAppVersion(ctx sdk.Context, version uint64) { // TODO: could make this less hacky in the future since the SDK // shouldn't have to know about the app versioning scheme - if ctx.BlockHeader().Version.App >= 2 { - vp := &tmproto.VersionParams{AppVersion: v} + if version >= 2 { + vp := &tmproto.VersionParams{AppVersion: version} app.paramStore.Set(ctx, ParamStoreKeyVersionParams, vp) } - app.appVersion = v + app.appVersion = version } func (app *BaseApp) SetDB(db dbm.DB) {