Skip to content

Commit

Permalink
fix(runtime): fix option order (#21769)
Browse files Browse the repository at this point in the history
(cherry picked from commit b98795f)

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
julienrbrt authored and mergify[bot] committed Sep 17, 2024
1 parent 391d4d7 commit e0423db
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,21 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
### Improvements

* (genutil) [#21701](https://github.com/cosmos/cosmos-sdk/pull/21701) Improved error messages for genesis validation.
<<<<<<< HEAD
* (runtime) [#21704](https://github.com/cosmos/cosmos-sdk/pull/21704) Move `upgradetypes.StoreLoader` to runtime and alias it in upgrade for backward compatibility.
=======

### Bug Fixes

* (baseapp) [#21256](https://github.com/cosmos/cosmos-sdk/pull/21256) Halt height will not commit the block indicated, meaning that if halt-height is set to 10, only blocks until 9 (included) will be committed. This is to go back to the original behavior before a change was introduced in v0.50.0.
* (runtime) [#21769](https://github.com/cosmos/cosmos-sdk/pull/21769) Fix baseapp options ordering to avoid overwriting options set by modules.

### API Breaking Changes

* (sims)[#21613](https://github.com/cosmos/cosmos-sdk/pull/21613) Add sims2 framework and factory methods for simpler message factories in modules

### Deprecated
>>>>>>> b98795f3b (fix(runtime): fix option order (#21769))
## [v0.52.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.52.0) - 2024-XX-XX

Expand Down
13 changes: 11 additions & 2 deletions runtime/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,18 @@ func (a *AppBuilder) Build(db corestore.KVStoreWithBatch, traceStore io.Writer,
baseAppOptions = append(baseAppOptions, option)
}

// set routers first in case they get modified by other options
baseAppOptions = append(
[]func(*baseapp.BaseApp){
func(bApp *baseapp.BaseApp) {
bApp.SetMsgServiceRouter(a.app.msgServiceRouter)
bApp.SetGRPCQueryRouter(a.app.grpcQueryRouter)
},
},
baseAppOptions...,
)

bApp := baseapp.NewBaseApp(a.app.config.AppName, a.app.logger, db, nil, baseAppOptions...)
bApp.SetMsgServiceRouter(a.app.msgServiceRouter)
bApp.SetGRPCQueryRouter(a.app.grpcQueryRouter)
bApp.SetCommitMultiStoreTracer(traceStore)
bApp.SetVersion(version.Version)
bApp.SetInterfaceRegistry(a.app.interfaceRegistry)
Expand Down

0 comments on commit e0423db

Please sign in to comment.