Skip to content

Commit

Permalink
Merge branch 'develop' into golangci-lint-2023-06-8-#2
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Jun 9, 2023
2 parents 566b690 + 62618d4 commit f5af2d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 4 additions & 5 deletions core/services/relay/evm/mercury/data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ func NewDataSource(pr pipeline.Runner, jb job.Job, spec pipeline.Spec, lggr logg
}

func (ds *datasource) Observe(ctx context.Context, repts ocrtypes.ReportTimestamp, fetchMaxFinalizedBlockNum bool) (obs relaymercury.Observation, err error) {
// setCurrentBlock must come first, along with observationTimestamp, to
// avoid front-running
ds.setCurrentBlock(ctx, &obs)

var wg sync.WaitGroup
if fetchMaxFinalizedBlockNum {
wg.Add(1)
Expand Down Expand Up @@ -99,11 +103,6 @@ func (ds *datasource) Observe(ctx context.Context, repts ocrtypes.ReportTimestam
obs.Bid = parsed.bid
obs.Ask = parsed.ask
}()
wg.Add(1)
go func() {
defer wg.Done()
ds.setCurrentBlock(ctx, &obs)
}()
wg.Wait()

if ocrcommon.ShouldCollectEnhancedTelemetryMercury(&ds.jb) {
Expand Down
6 changes: 2 additions & 4 deletions integration-tests/benchmark/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,11 @@ func SetupAutomationBenchmarkEnv(t *testing.T) (*environment.Environment, blockc
for i := 0; i < NumberOfNodes; i++ {
testNetwork.HTTPURLs = []string{internalHttpURLs[i]}
testNetwork.URLs = []string{internalWsURLs[i]}
cd, err := chainlink.NewDeployment(1, map[string]any{
testEnvironment.AddHelm(chainlink.New(i, map[string]any{
"toml": client.AddNetworkDetailedConfig(keeperBenchmarkBaseTOML, networkDetailTOML, testNetwork),
"chainlink": chainlinkResources,
"db": dbResources,
})
require.NoError(t, err, "Error creating chainlink deployment")
testEnvironment.AddHelmCharts(cd)
}))
}
err = testEnvironment.Run()
require.NoError(t, err, "Error launching test environment")
Expand Down

0 comments on commit f5af2d3

Please sign in to comment.