From b3305fdeea8c7e42e89e59ff25b5544dcb153551 Mon Sep 17 00:00:00 2001 From: Maksim Fomenkov Date: Thu, 13 Oct 2022 17:57:45 +0300 Subject: [PATCH] fix filter --- .../dshackle/upstream/ethereum/EthereumMultistream.kt | 2 +- .../dshackle/upstream/ethereum_pos/EthereumPosMultiStream.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumMultistream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumMultistream.kt index fc6426d3..259e88a6 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumMultistream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumMultistream.kt @@ -103,7 +103,7 @@ open class EthereumMultistream( upstreams.filter { matcher.matches(it) }.takeIf { ups -> - ups.all { it.isGrpc() } + ups.isNotEmpty() && ups.all { it.isGrpc() } }?.map { it as GrpcUpstream }?.map { diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum_pos/EthereumPosMultiStream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum_pos/EthereumPosMultiStream.kt index 959b3485..cd872db7 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum_pos/EthereumPosMultiStream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum_pos/EthereumPosMultiStream.kt @@ -98,7 +98,7 @@ open class EthereumPosMultiStream( upstreams.filter { matcher.matches(it) }.takeIf { ups -> - ups.all { it.isGrpc() } + ups.isNotEmpty() && ups.all { it.isGrpc() } }?.map { it as GrpcUpstream }?.map {