From 470775dfafb700dd5c2669e6f9268cf9c8ba88f3 Mon Sep 17 00:00:00 2001 From: Francisco Gindre Date: Thu, 14 Jul 2022 20:19:46 -0300 Subject: [PATCH] - [#419] Fix Unavailable Transport 14 when attempting to sync (#426) Closes #419 This eliminates the keepalive settings since they seem to clash with defaults on ligthwalletd and the client gets rejected earlier than needed. --- .../Service/LightWalletGRPCService.swift | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Sources/ZcashLightClientKit/Service/LightWalletGRPCService.swift b/Sources/ZcashLightClientKit/Service/LightWalletGRPCService.swift index 7b8e72f4..70ff36f1 100644 --- a/Sources/ZcashLightClientKit/Service/LightWalletGRPCService.swift +++ b/Sources/ZcashLightClientKit/Service/LightWalletGRPCService.swift @@ -118,12 +118,6 @@ public class LightWalletGRPCService { let channel = connectionBuilder .withConnectivityStateDelegate(connectionManager, executingOn: queue) - .withKeepalive( - ClientConnectionKeepalive( - interval: .seconds(15), - timeout: .seconds(10) - ) - ) .connect(host: host, port: port) self.channel = channel @@ -131,7 +125,7 @@ public class LightWalletGRPCService { compactTxStreamer = CompactTxStreamerClient( channel: self.channel, defaultCallOptions: Self.callOptions( - timeLimit: TimeLimit.timeout(.seconds(Int64(singleCallTimeout))) + timeLimit: self.singleCallTimeout ) ) } @@ -348,7 +342,7 @@ extension LightWalletGRPCService: LightWalletService { public func latestBlockHeight() throws -> BlockHeight { guard let height = try? latestBlock().compactBlockHeight() else { - throw LightWalletServiceError.invalidBlock + throw LightWalletServiceError.timeOut } return height }