fix some issues after merge

This commit is contained in:
terminal
2022-08-01 13:51:16 +04:00
parent 04edbe4608
commit c6f22ce91a
2 changed files with 6 additions and 3 deletions

View File

@@ -101,7 +101,7 @@ class UpstreamsConfigReader(
val connConfigNode = getMapping(connNode, "grpc")!!
val upstream = UpstreamsConfig.Upstream<UpstreamsConfig.GrpcConnection>()
readUpstreamCommon(upNode, upstream)
readUpstreamGrpc(upNode, upstream)
readUpstreamGrpc(upNode)
if (isValid(upstream)) {
config.upstreams.add(upstream)
val connection = UpstreamsConfig.GrpcConnection()
@@ -245,7 +245,6 @@ class UpstreamsConfigReader(
internal fun readUpstreamGrpc(
upNode: MappingNode,
upstream: UpstreamsConfig.Upstream<UpstreamsConfig.GrpcConnection>
) {
// Dshackle gRPC connection dispatches requests to different upstreams, which may
// be on different blockchains, and each may have different set of labels.

View File

@@ -48,7 +48,7 @@ open class EthereumPosGrpcUpstream(
private val parentId: String,
role: UpstreamsConfig.UpstreamRole,
private val chain: Chain,
remote: ReactorBlockchainGrpc.ReactorBlockchainStub,
private val remote: ReactorBlockchainGrpc.ReactorBlockchainStub,
client: JsonRpcGrpcClient,
nodeRating: Int
) : EthereumPosUpstream(
@@ -121,6 +121,10 @@ open class EthereumPosGrpcUpstream(
return upstreamStatus.getNodes()
}
override fun getBlockchainApi(): ReactorBlockchainGrpc.ReactorBlockchainStub {
return remote
}
// ------------------------------------------------------------------------------------------
override fun getLabels(): Collection<UpstreamsConfig.Labels> {