Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
samsondav committed Aug 21, 2024
1 parent 4c7622d commit 4330772
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions core/services/llo/onchain_channel_definition_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ func (c *channelDefinitionCache) fetchLoop(closeCh chan struct{}, log *channel_c

err := c.fetchAndSetChannelDefinitions(ctx, log)
if err == nil {
c.lggr.Debugw("Set new channel definitions", "version", log.Version, "url", log.Url, "sha", fmt.Sprintf("%x", log.Sha))
c.lggr.Debugw("Set new channel definitions", "donID", c.donID, "version", log.Version, "url", log.Url, "sha", fmt.Sprintf("%x", log.Sha))
return
}
c.lggr.Warnw("Error while fetching channel definitions", "version", log.Version, "url", log.Url, "sha", fmt.Sprintf("%x", log.Sha), "err", err, "attempt", attemptCnt)
c.lggr.Warnw("Error while fetching channel definitions", "donID", c.donID, "version", log.Version, "url", log.Url, "sha", fmt.Sprintf("%x", log.Sha), "err", err, "attempt", attemptCnt)

for {
select {
Expand All @@ -324,7 +324,7 @@ func (c *channelDefinitionCache) fetchLoop(closeCh chan struct{}, log *channel_c
c.lggr.Warnw("Error while fetching channel definitions", "version", log.Version, "url", log.Url, "sha", fmt.Sprintf("%x", log.Sha), "err", err, "attempt", attemptCnt)
continue
}
c.lggr.Debugw("Set new channel definitions", "version", log.Version, "url", log.Url, "sha", fmt.Sprintf("%x", log.Sha))
c.lggr.Debugw("Set new channel definitions", "donID", c.donID, "version", log.Version, "url", log.Url, "sha", fmt.Sprintf("%x", log.Sha))
return
}
}
Expand Down
8 changes: 4 additions & 4 deletions core/services/llo/onchain_channel_definition_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-common/pkg/logger"
llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo"
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/llo-feeds/generated/channel_config_store"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
"github.com/smartcontractkit/chainlink/v2/core/logger"
)

type mockLogPoller struct {
Expand Down Expand Up @@ -116,7 +116,7 @@ func Test_ChannelDefinitionCache(t *testing.T) {
t.Run("readLogs", func(t *testing.T) {
lp := &mockLogPoller{latestBlockErr: sql.ErrNoRows}
newLogCh := make(chan *channel_config_store.ChannelConfigStoreNewChannelDefinition, 100)
cdc := &channelDefinitionCache{donID: donID, lp: lp, lggr: logger.TestLogger(t), newLogCh: newLogCh}
cdc := &channelDefinitionCache{donID: donID, lp: lp, lggr: logger.TestSugared(t), newLogCh: newLogCh}

t.Run("skips if logpoller has no blocks", func(t *testing.T) {
err := cdc.readLogs()
Expand Down Expand Up @@ -271,7 +271,7 @@ func Test_ChannelDefinitionCache(t *testing.T) {
t.Run("fetchChannelDefinitions", func(t *testing.T) {
c := &mockHTTPClient{}
cdc := &channelDefinitionCache{
lggr: logger.TestLogger(t),
lggr: logger.TestSugared(t),
client: c,
httpLimit: 2048,
}
Expand Down Expand Up @@ -369,7 +369,7 @@ func Test_ChannelDefinitionCache(t *testing.T) {

t.Run("persist", func(t *testing.T) {
cdc := &channelDefinitionCache{
lggr: logger.TestLogger(t),
lggr: logger.TestSugared(t),
orm: nil,
addr: testutils.NewAddress(),
donID: donID,
Expand Down

0 comments on commit 4330772

Please sign in to comment.