feat(stf): port stf's simappv2 changes. (#20611)

Co-authored-by: unknown unknown <unknown@unknown>
This commit is contained in:
testinginprod
2024-06-18 21:06:38 +00:00
committed by GitHub
co-authored by unknown unknown
parent 4bd73b667f
commit 55821b328a
2 changed files with 3 additions and 2 deletions
+1 -2
View File
@@ -161,11 +161,10 @@ func SetupAppBuilder(inputs AppInputs) {
app.moduleManager.RegisterInterfaces(inputs.InterfaceRegistrar)
app.moduleManager.RegisterLegacyAminoCodec(inputs.LegacyAmino)
// TODO: this is a bit of a hack, but it's the only way to get the store keys into the app
// registerStoreKey could instead set this on StoreOptions directly
if inputs.StoreOptions != nil {
inputs.AppBuilder.storeOptions = inputs.StoreOptions
inputs.AppBuilder.storeOptions.StoreKeys = inputs.AppBuilder.app.storeKeys
inputs.AppBuilder.storeOptions.StoreKeys = append(inputs.AppBuilder.storeOptions.StoreKeys, "stf")
}
}
+2
View File
@@ -77,6 +77,8 @@ func (b WriterMap) GetStateChanges() ([]store.StateChanges, error) {
return sc, nil
}
// recurseStateChanges will recursively collect state changes from the tree of
// WriterMap's and write them to the `changes` map.
func (b WriterMap) recurseStateChanges(changes map[string][]store.KVPair) error {
// depth first
if wr, ok := b.state.(WriterMap); ok {