From d13725466ed2fbb6f327183a822441c5ce139b13 Mon Sep 17 00:00:00 2001 From: KirillPamPam Date: Fri, 22 Nov 2024 14:31:14 +0400 Subject: [PATCH] Add arb sync response (#596) --- .../dshackle/upstream/ethereum/EthereumChainSpecific.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumChainSpecific.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumChainSpecific.kt index d0badf349..e165dc6a4 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumChainSpecific.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumChainSpecific.kt @@ -126,8 +126,11 @@ object EthereumChainSpecific : AbstractPollChainSpecific() { } else { UpstreamAvailability.OK } + } else if (raw.get("batchProcessed") != null && raw.get("batchSeen") != null && raw.get("syncTargetMsgCount") != null) { + // arbitrum nitro may return a complex syncing response that means a node is not synced + UpstreamAvailability.SYNCING } else { - log.error("Received unknown syncing object ${raw.toPrettyString()} for upstream ${upstream.getId()}") + log.error("Received unknown syncing object {} for upstream {}", raw.toPrettyString(), upstream.getId()) UpstreamAvailability.OK } }.also {