From e171af51097237027be05df06e427d1e158a6845 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 17 Nov 2022 13:48:44 -0500 Subject: [PATCH] refactor: State Streaming Docs + Explicit Config Support (#13894) --- app.go | 6 +++--- app_legacy.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app.go b/app.go index 45d518a0ac48..d09f399a3871 100644 --- a/app.go +++ b/app.go @@ -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" @@ -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) } diff --git a/app_legacy.go b/app_legacy.go index a7956291ecb6..d1525845c5a3 100644 --- a/app_legacy.go +++ b/app_legacy.go @@ -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" @@ -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) }