Skip to content

Commit

Permalink
Remove accidental log line in report codec and use copy instead of a …
Browse files Browse the repository at this point in the history
…loop
  • Loading branch information
nolag committed Jan 10, 2024
1 parent c8ec3ff commit c27581c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions median/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (c *chainReaderContract) LatestTransmissionDetails(ctx context.Context) (co
// If there's nothing transmitted yet, an implementation will not have emitted an event,
// or may not find details of a latest transmission on-chain if it's a function call.
// A zeroed out latestTransmissionDetailsResponse tells later parts of the system that there's no data yet.
c.lggr.Warn("LatestTransmissionDetails not found")
c.lggr.Warn("LatestTransmissionDetails not found", "err", err)
} else {
return
}
Expand All @@ -140,7 +140,7 @@ func (c *chainReaderContract) LatestRoundRequested(ctx context.Context, lookback
// If there's nothing on-chain yet, an implementation will not have emitted an event,
// or may not find details of a latest transmission on-chain if it's a function call.
// A zeroed out LatestRoundRequested tells later parts of the system that there's no data yet.
c.lggr.Warn("LatestRoundRequested not found")
c.lggr.Warn("LatestRoundRequested not found", "err", err)
} else {
return
}
Expand Down
5 changes: 1 addition & 4 deletions median/report_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ func (r *reportCodec) MedianFromReport(report ocrtypes.Report) (*big.Int, error)
return nil, err
}
observations := make([]*big.Int, len(agg.Observations))
for i, o := range agg.Observations {
observations[i] = o
}
fmt.Printf("observations: %v\n", observations)
copy(observations, agg.Observations)
medianObservation := len(agg.Observations) / 2
return agg.Observations[medianObservation], nil
}
Expand Down

0 comments on commit c27581c

Please sign in to comment.