Skip to content

Commit

Permalink
refactor: State Streaming Docs + Explicit Config Support (cosmos#13894)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez committed Nov 17, 2022
1 parent d8c1423 commit e171af5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app.go
Expand Up @@ -14,6 +14,7 @@ import (
dbm "github.com/tendermint/tm-db"

"cosmossdk.io/depinject"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
Expand Down Expand Up @@ -266,10 +267,9 @@ func NewSimApp(

app.App = appBuilder.Build(logger, db, traceStore, baseAppOptions...)

// configure state listening capabilities using AppOptions
// we are doing nothing with the returned streamingServices and waitGroup in this case
// load state streaming if enabled
if _, _, err := streaming.LoadStreamingServices(app.App.BaseApp, appOpts, app.appCodec, app.keys); err != nil {
fmt.Println(err.Error())
fmt.Printf("failed to load state streaming: %s", err)
os.Exit(1)
}

Expand Down
6 changes: 3 additions & 3 deletions app_legacy.go
Expand Up @@ -17,6 +17,7 @@ import (
dbm "github.com/tendermint/tm-db"

simappparams "cosmossdk.io/simapp/params"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
Expand Down Expand Up @@ -246,10 +247,9 @@ func NewSimApp(
// not include this key.
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey, "testingkey")

// configure state listening capabilities using AppOptions
// we are doing nothing with the returned streamingServices and waitGroup in this case
// load state streaming if enabled
if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, keys); err != nil {
fmt.Println(err.Error())
fmt.Printf("failed to load state streaming: %s", err)
os.Exit(1)
}

Expand Down

0 comments on commit e171af5

Please sign in to comment.