Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAustinWang committed Nov 4, 2024
1 parent 0be8888 commit 1f1a881
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 4 additions & 4 deletions execute/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,12 @@ func (p *Plugin) ShouldTransmitAcceptedReport(

// we only transmit reports if we are the "blue" instance.
// we can check this by reading the OCR conigs home chain.
isGreen, err := p.isGreenInstance(ctx)
isCandidate, err := p.isCandidateInstance(ctx)
if err != nil {
return false, fmt.Errorf("ShouldTransmitAcceptedReport.isGreenInstance: %w", err)
return false, fmt.Errorf("ShouldTransmitAcceptedReport.isCandidateInstance: %w", err)
}

if isGreen {
if isCandidate {
p.lggr.Debugw("not the blue instance, skipping report transmission",
"myDigest", p.reportingCfg.ConfigDigest.Hex())
return false, nil
Expand All @@ -324,7 +324,7 @@ func (p *Plugin) ShouldTransmitAcceptedReport(
return true, nil
}

func (p *Plugin) isGreenInstance(ctx context.Context) (bool, error) {
func (p *Plugin) isCandidateInstance(ctx context.Context) (bool, error) {
if p.reportingCfg.ConfigDigest == [32]byte{} {
return false, nil
}
Expand Down
5 changes: 1 addition & 4 deletions internal/reader/home_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,7 @@ func (r *homeChainPoller) GetOCRConfigs(
"candidateConfig", allConfigs.CandidateConfig,
)

return ActiveAndCandidate{
ActiveConfig: allConfigs.ActiveConfig,
CandidateConfig: allConfigs.CandidateConfig,
}, nil
return allConfigs, nil
}

func (r *homeChainPoller) Close() error {
Expand Down

0 comments on commit 1f1a881

Please sign in to comment.