Skip to content

Commit

Permalink
Fix config test lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dimriou committed Dec 16, 2024
1 parent 98d0b53 commit 2fb029e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/chains/evm/config/toml/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,11 @@ func (t *TxmV2) setFrom(f *TxmV2) {
func (t *TxmV2) ValidateConfig() (err error) {
if t.Enabled != nil && *t.Enabled {
if t.BlockTime == nil {
err = multierr.Append(err, commonconfig.ErrMissing{Name: "TxmV2.BlockTime", Msg: "must be set if txmv2 feature is enabled"})
err = multierr.Append(err, commonconfig.ErrMissing{Name: "BlockTime", Msg: "must be set if txmv2 feature is enabled"})
return
}
if t.BlockTime.Duration() < 2*time.Second {
err = multierr.Append(err, commonconfig.ErrInvalid{Name: "TxmV2.BlockTime", Msg: "must be equal to or greater than 2 seconds"})
err = multierr.Append(err, commonconfig.ErrInvalid{Name: "BlockTime", Msg: "must be equal to or greater than 2 seconds"})
}
}
return
Expand Down
4 changes: 2 additions & 2 deletions core/services/chainlink/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ func TestConfig_Validate(t *testing.T) {
- GasEstimator.BumpThreshold: invalid value (0): cannot be 0 if auto-purge feature is enabled for Foo
- Transactions.AutoPurge.Threshold: missing: needs to be set if auto-purge feature is enabled for Foo
- Transactions.AutoPurge.MinAttempts: missing: needs to be set if auto-purge feature is enabled for Foo
- TxmV2.TxmV2.BlockTime: missing: must be set if txmv2 feature is enabled
- TxmV2.BlockTime: missing: must be set if txmv2 feature is enabled
- GasEstimator: 2 errors:
- FeeCapDefault: invalid value (101 wei): must be equal to PriceMax (99 wei) since you are using FixedPrice estimation with gas bumping disabled in EIP1559 mode - PriceMax will be used as the FeeCap for transactions instead of FeeCapDefault
- PriceMax: invalid value (1 gwei): must be greater than or equal to PriceDefault
Expand Down Expand Up @@ -1518,7 +1518,7 @@ func TestConfig_Validate(t *testing.T) {
- Nodes: missing: must have at least one node
- 5: 2 errors:
- Transactions.AutoPurge.DetectionApiUrl: invalid value (): must be set for scroll
- TxmV2.TxmV2.BlockTime: missing: must be set if txmv2 feature is enabled
- TxmV2.BlockTime: missing: must be set if txmv2 feature is enabled
- 6.Nodes: missing: 0th node (primary) must have a valid WSURL when http polling is disabled
- Cosmos: 5 errors:
- 1.ChainID: invalid value (Malaga-420): duplicate - must be unique
Expand Down

0 comments on commit 2fb029e

Please sign in to comment.