Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BCF-2365] Combine providers #164

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions pkg/loop/internal/median.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,28 +170,22 @@ var (
)

type medianProviderClient struct {
*configProviderClient
contractTransmitter libocr.ContractTransmitter
reportCodec median.ReportCodec
medianContract median.MedianContract
onchainConfigCodec median.OnchainConfigCodec
*pluginProviderClient
reportCodec median.ReportCodec
medianContract median.MedianContract
onchainConfigCodec median.OnchainConfigCodec
}

func (m *medianProviderClient) ClientConn() grpc.ClientConnInterface { return m.cc }

func newMedianProviderClient(b *brokerExt, cc grpc.ClientConnInterface) *medianProviderClient {
m := &medianProviderClient{configProviderClient: newConfigProviderClient(b.withName("MedianProviderClient"), cc)}
m.contractTransmitter = &contractTransmitterClient{b, pb.NewContractTransmitterClient(m.cc)}
m := &medianProviderClient{pluginProviderClient: newPluginProviderClient(b.withName("MedianProviderClient"), cc)}
m.reportCodec = &reportCodecClient{b, pb.NewReportCodecClient(m.cc)}
m.medianContract = &medianContractClient{pb.NewMedianContractClient(m.cc)}
m.onchainConfigCodec = &onchainConfigCodecClient{b, pb.NewOnchainConfigCodecClient(m.cc)}
return m
}

func (m *medianProviderClient) ContractTransmitter() libocr.ContractTransmitter {
return m.contractTransmitter
}

func (m *medianProviderClient) ReportCodec() median.ReportCodec {
return m.reportCodec
}
Expand Down
Loading