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 {