From 7f9e350a9c5d854326c815a91f3ea650eaf67e46 Mon Sep 17 00:00:00 2001 From: EugeneDrpc Date: Wed, 14 Jan 2026 17:09:34 +0100 Subject: [PATCH] add more logs to doge upstream (#773) * add more logs to doge upstream * fix other similar cases --- src/main/kotlin/io/emeraldpay/dshackle/rpc/StreamHead.kt | 2 +- .../kotlin/io/emeraldpay/dshackle/upstream/HeadLagObserver.kt | 2 +- .../io/emeraldpay/dshackle/upstream/bitcoin/BitcoinRpcHead.kt | 4 ++-- .../io/emeraldpay/dshackle/upstream/grpc/GrpcUpstreams.kt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/rpc/StreamHead.kt b/src/main/kotlin/io/emeraldpay/dshackle/rpc/StreamHead.kt index c711ddf6..bfacb428 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/rpc/StreamHead.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/rpc/StreamHead.kt @@ -44,7 +44,7 @@ class StreamHead( ms.getHead() .getFlux() .map { asProto(ms, chain, it!!) } - .onErrorContinue { t, _ -> + .onErrorContinue { t, _: Any? -> log.warn("Head subscription error", t) } } diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/HeadLagObserver.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/HeadLagObserver.kt index 76cb719c..5c116266 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/HeadLagObserver.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/HeadLagObserver.kt @@ -75,7 +75,7 @@ class HeadLagObserver( .parallel(followers.size) .flatMap { up -> mapLagging(top, up, getCurrentBlocks(up)).subscribeOn(lagObserverScheduler) } .sequential() - .onErrorContinue { t, _ -> log.warn("Failed to update lagging distance", t) } + .onErrorContinue { t, _: Any? -> log.warn("Failed to update lagging distance", t) } } open fun getCurrentBlocks(up: Upstream): Flux { diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/bitcoin/BitcoinRpcHead.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/bitcoin/BitcoinRpcHead.kt index af762455..c5ad9c63 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/bitcoin/BitcoinRpcHead.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/bitcoin/BitcoinRpcHead.kt @@ -71,8 +71,8 @@ class BitcoinRpcHead( .map(extractBlock::extract) .timeout(Defaults.timeout, Mono.error(Exception("Block data is not received"))) } - .onErrorContinue { err, _ -> - log.debug("RPC error ${err.message}") + .onErrorContinue { err, _: Any? -> + log.warn("RPC error: ${err.message}") } refreshSubscription = super.follow(base) } diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/GrpcUpstreams.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/GrpcUpstreams.kt index dbdf582d..e0819849 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/GrpcUpstreams.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/GrpcUpstreams.kt @@ -146,7 +146,7 @@ class GrpcUpstreams( return Flux.interval(Duration.ZERO, Duration.ofSeconds(20)) .flatMap { authAndDescribe(grpcUpstreamsAuth) - }.onErrorContinue { t, _ -> + }.onErrorContinue { t, _: Any? -> if (ExceptionUtils.indexOfType(t, IOException::class.java) >= 0) { log.warn("gRPC upstream $host:$port is unavailable. (${t.javaClass}: ${t.message})") known.values.forEach {