Skip to content

Commit

Permalink
make function name more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
Ergels Gaxhaj committed Aug 3, 2022
1 parent 81348ef commit 7ddd870
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ func (app *App) RegisterTendermintService(clientCtx client.Context) {

// RegisterStreamingService is used to register a streaming service into the App
func (app *App) registerStreamingService(appOpts servertypes.AppOptions) {
app.Logger().Info(fmt.Sprintf("Available streaming services: %s", appstreaming.ConfigOptions()))
app.Logger().Info(fmt.Sprintf("Available streaming services: %s", appstreaming.GetStreamServiceKeys()))
enableStreaming := cast.ToBool(appOpts.Get(fmt.Sprintf("%s.%s", streaming.TomlKey, streaming.EnableParam)))
if enableStreaming {
serviceTomlKey := fmt.Sprintf("%s.%s", streaming.TomlKey, streaming.ServiceParam)
Expand All @@ -957,7 +957,7 @@ func (app *App) registerStreamingService(appOpts servertypes.AppOptions) {
app.Logger().Info("Starting streaming", "service", service)
} else {
panic(fmt.Sprintf("could not create %s service: unknown streaming.service %s, expected one of %s",
service, service, appstreaming.ConfigOptions()))
service, service, appstreaming.GetStreamServiceKeys()))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/streaming/streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var StreamServiceInitializers = map[string]streaming.StreamServiceInitializer{
"trace": trace.StreamServiceInitializer,
}

func ConfigOptions() string {
func GetStreamServiceKeys() string {
keys := make([]string, 0, len(StreamServiceInitializers))
for k := range StreamServiceInitializers {
keys = append(keys, k)
Expand Down

0 comments on commit 7ddd870

Please sign in to comment.