Reanimate grpc upstreams (#491)
This commit is contained in:
@@ -60,7 +60,7 @@ class GrpcHeadSpec extends Specification {
|
||||
}
|
||||
})
|
||||
def convert = { BlockchainOuterClass.ChainHead head ->
|
||||
TestingCommons.blockForBitcoin(head.height)
|
||||
new GrpcHead.GrpcHeadData(TestingCommons.blockForBitcoin(head.height), List.of())
|
||||
}
|
||||
def head = new GrpcHead(
|
||||
"test",
|
||||
@@ -127,7 +127,7 @@ class GrpcHeadSpec extends Specification {
|
||||
}
|
||||
})
|
||||
def convert = { BlockchainOuterClass.ChainHead head ->
|
||||
TestingCommons.blockForBitcoin(head.height)
|
||||
new GrpcHead.GrpcHeadData(TestingCommons.blockForBitcoin(head.height), List.of())
|
||||
}
|
||||
def head = new GrpcHead(
|
||||
"test",
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.emeraldpay.dshackle.startup.configure
|
||||
|
||||
import io.emeraldpay.dshackle.BlockchainType
|
||||
import io.emeraldpay.dshackle.config.UpstreamsConfig
|
||||
import io.emeraldpay.dshackle.upstream.grpc.GrpcUpstreamCreator
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.params.ParameterizedTest
|
||||
import org.junit.jupiter.params.provider.Arguments
|
||||
@@ -33,7 +34,13 @@ class UpstreamFactoryTest {
|
||||
private val genericUpstreamCreator = mock<GenericUpstreamCreator>()
|
||||
private val ethereumUpstreamCreator = mock<EthereumUpstreamCreator>()
|
||||
private val bitcoinUpstreamCreator = mock<BitcoinUpstreamCreator>()
|
||||
private val upstreamFactory = UpstreamFactory(genericUpstreamCreator, ethereumUpstreamCreator, bitcoinUpstreamCreator)
|
||||
private val grpcUpstreamCreator = mock<GrpcUpstreamCreator>()
|
||||
private val upstreamFactory = UpstreamFactory(
|
||||
genericUpstreamCreator,
|
||||
ethereumUpstreamCreator,
|
||||
bitcoinUpstreamCreator,
|
||||
grpcUpstreamCreator,
|
||||
)
|
||||
|
||||
@JvmStatic
|
||||
fun data() = listOf(
|
||||
|
||||
Reference in New Issue
Block a user