diff --git a/CHANGELOG.md b/CHANGELOG.md index ad3d099e751..14314a9ece5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#8420](https://github.com/osmosis-labs/osmosis/pull/8420) Remove further unneeded IBC acknowledgements time from CheckTx/RecheckTx. +### Config + +* [#8431](https://github.com/osmosis-labs/osmosis/pull/8431) Fix osmosis-indexer config bug that read osmosis-sqs value + ## v25.1.2 * [#8415](https://github.com/osmosis-labs/osmosis/pull/8415) Reset cache on pool creation diff --git a/osmoutils/config_parser.go b/osmoutils/config_parser.go index c232f80e50d..d924ac379b7 100644 --- a/osmoutils/config_parser.go +++ b/osmoutils/config_parser.go @@ -12,13 +12,13 @@ import ( // ParseBool parses a boolean value from a server type option. func ParseBool(opts servertypes.AppOptions, groupOptName, optName string, defaultValue bool) bool { - fullOptName := "osmosis-sqs." + optName + fullOptName := groupOptName + "." + optName valueInterface := opts.Get(fullOptName) value := defaultValue if valueInterface != nil { valueStr, ok := valueInterface.(string) if !ok { - panic("invalidly configured osmosis-sqs." + optName) + panic("invalidly configured " + fullOptName) } valueStr = strings.TrimSpace(valueStr) v, err := strconv.ParseBool(valueStr) @@ -34,9 +34,10 @@ func ParseBool(opts servertypes.AppOptions, groupOptName, optName string, defaul // ParseInt parses an integer value from a server type option. func ParseInt(opts servertypes.AppOptions, groupOptName, optName string) int { - valueInterface := opts.Get(groupOptName + "." + optName) + fullOptName := groupOptName + "." + optName + valueInterface := opts.Get(fullOptName) if valueInterface == nil { - panic("missing config for osmosis-sqs." + optName) + panic("missing config for " + fullOptName) } value := cast.ToInt(valueInterface) return value @@ -86,9 +87,10 @@ func ParseStringToUint64Slice(input string) ([]uint64, error) { // ParseString parses a string value from a server type option. func ParseString(opts servertypes.AppOptions, groupOptName, optName string) string { - valueInterface := opts.Get(groupOptName + "." + optName) + fullOptName := groupOptName + "." + optName + valueInterface := opts.Get(fullOptName) if valueInterface == nil { - panic("missing config for osmosis-sqs." + optName) + panic("missing config for " + fullOptName) } value := cast.ToString(valueInterface) return value