diff --git a/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt b/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt index 2503a3fa..78618fa4 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt @@ -66,7 +66,7 @@ open class GrpcServer( serverBuilder.addService(it) } - val pool = Executors.newFixedThreadPool(20, CustomizableThreadFactory("fixed-grpc-%d")) + val pool = Executors.newFixedThreadPool(20, CustomizableThreadFactory("fixed-grpc-")) serverBuilder.executor( if (mainConfig.monitoring.enableExtended) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/config/context/SchedulersConfig.kt b/src/main/kotlin/io/emeraldpay/dshackle/config/context/SchedulersConfig.kt index a4ec2a0c..1bfc04a1 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/config/context/SchedulersConfig.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/config/context/SchedulersConfig.kt @@ -28,7 +28,7 @@ open class SchedulersConfig { } private fun makeScheduler(name: String, prefix: String, size: Int, monitoringConfig: MonitoringConfig): Scheduler { - val pool = Executors.newFixedThreadPool(size, CustomizableThreadFactory("$name-%d")) + val pool = Executors.newFixedThreadPool(size, CustomizableThreadFactory("$name-")) return Schedulers.fromExecutorService( if (monitoringConfig.enableExtended) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Multistream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Multistream.kt index b9d5e626..8ad24d15 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Multistream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Multistream.kt @@ -198,7 +198,7 @@ abstract class Multistream( } lagObserver?.stop() lagObserver = null - if (upstreams.isNotEmpty()) { + if (upstreams.size > 1) { lagObserver = makeLagObserver() } } diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/EthereumPosGrpcUpstream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/EthereumPosGrpcUpstream.kt index 142c3dd1..6195f69e 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/EthereumPosGrpcUpstream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/EthereumPosGrpcUpstream.kt @@ -40,6 +40,7 @@ import io.emeraldpay.dshackle.upstream.rpcclient.JsonRpcRequest import io.emeraldpay.dshackle.upstream.rpcclient.JsonRpcResponse import io.emeraldpay.etherjar.domain.BlockHash import io.emeraldpay.etherjar.rpc.RpcException +import io.grpc.ManagedChannel import org.reactivestreams.Publisher import org.slf4j.LoggerFactory import reactor.core.publisher.Flux @@ -119,6 +120,7 @@ open class EthereumPosGrpcUpstream( } override fun stop() { + } override fun update(conf: BlockchainOuterClass.DescribeChain) {