Skip to content

Commit

Permalink
user version instead of the block header version
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwaters committed Nov 21, 2023
1 parent dbc75a4 commit 20de1e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions baseapp/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 20de1e3

Please sign in to comment.