Skip to content

Commit 2e328a8

Browse files
committed
fixed missing function issue and some lint changes
1 parent 2aaf8c0 commit 2e328a8

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

reporter/client/broadcast_message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"time"
88

99
"github.com/tellor-io/layer-daemons/lib/metrics"
10-
"github.com/tellor-io/layer-daemons/utils"
10+
"github.com/tellor-io/layer/utils"
1111
oracletypes "github.com/tellor-io/layer/x/oracle/types"
1212

1313
"github.com/cosmos/cosmos-sdk/telemetry"

reporter/client/client.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,8 @@ func (c *Client) Start(
175175
if !viper.IsSet("price-guard-update-on-blocked") {
176176
return fmt.Errorf("price-guard-enabled is true but price-guard-update-on-blocked is not set")
177177
}
178-
} else {
179-
// If price guard is disabled, error if any other price guard flags are set
180-
if viper.IsSet("price-guard-threshold") || viper.IsSet("price-guard-max-age") || viper.IsSet("price-guard-update-on-blocked") {
181-
return fmt.Errorf("price-guard flags are set but price-guard-enabled is false")
182-
}
178+
} else if !priceGuardEnabled && (viper.IsSet("price-guard-threshold") || viper.IsSet("price-guard-max-age") || viper.IsSet("price-guard-update-on-blocked")) {
179+
return fmt.Errorf("price-guard flags are set but price-guard-enabled is false")
183180
}
184181

185182
c.PriceGuard = NewPriceGuard(priceGuardThreshold, priceGuardMaxAge, priceGuardEnabled, updateOnBlocked, c.logger)

reporter/client/tx_handler.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ import (
2222
"github.com/cosmos/cosmos-sdk/types/tx/signing"
2323
)
2424

25-
var gasEstimateMap = make(map[reflect.Type]uint64)
26-
var BRIDGE_REPORT_TYPE = reflect.TypeOf("bridge_deposit_report")
25+
var (
26+
gasEstimateMap = make(map[reflect.Type]uint64)
27+
BRIDGE_REPORT_TYPE = reflect.TypeOf("bridge_deposit_report")
28+
)
2729

2830
func newFactory(clientCtx client.Context) tx.Factory {
2931
return tx.Factory{}.

0 commit comments

Comments
 (0)