Skip to content

Commit 1ba5714

Browse files
authored
Revert "[fix] Remove SetDefaults() call which deletes enabled (smartcontractkit#16440)" (smartcontractkit#16741)
This reverts commit d923d5a.
1 parent df5b132 commit 1ba5714

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core/services/chainlink/config.go

+4
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ func (c RawConfig) NodeNames() []string {
261261
}
262262

263263
func (c RawConfig) SetDefaults() {
264+
if e, ok := c["Enabled"].(bool); ok && e {
265+
// already enabled by default so drop it
266+
delete(c, "Enabled")
267+
}
264268
}
265269

266270
// TOMLString returns a TOML encoded string.

core/services/chainlink/config_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,6 @@ func TestRawConfig_IsEnabled(t *testing.T) {
18131813
}
18141814

18151815
func TestRawConfig_SetDefaults(t *testing.T) {
1816-
t.Skip()
18171816
c := RawConfig{"Enabled": true}
18181817
c.SetDefaults()
18191818
require.NotContains(t, c, "Enabled")

0 commit comments

Comments
 (0)