From 1ae377ef2499d181dbbf167c12db2dcb84398c71 Mon Sep 17 00:00:00 2001 From: Daniel Karzel Date: Wed, 23 Jun 2021 13:02:29 +1000 Subject: [PATCH] Request timeout when swapping over Tor It seems the current chosen channel timeouts are still not optimal. I ran into issues with swapping over Tor and traced them down to the CLI timeout of the bmrng channel. It appears that the ASB was not running as quick as the CLI, which caused a timeout on the CLI side (in addition to the delay when sending messages over Tor). Only `execution_setup` caused the problem so far, but I would recommend changing all the channel timeouts to one minute to avoid this problem. --- swap/src/protocol/bob/event_loop.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/swap/src/protocol/bob/event_loop.rs b/swap/src/protocol/bob/event_loop.rs index a596b9ed..c8e39eee 100644 --- a/swap/src/protocol/bob/event_loop.rs +++ b/swap/src/protocol/bob/event_loop.rs @@ -57,11 +57,11 @@ impl EventLoop { bitcoin_wallet: Arc, env_config: env::Config, ) -> Result<(Self, EventLoopHandle)> { - let execution_setup = bmrng::channel_with_timeout(1, Duration::from_secs(30)); - let transfer_proof = bmrng::channel_with_timeout(1, Duration::from_secs(30)); - let encrypted_signature = bmrng::channel_with_timeout(1, Duration::from_secs(30)); - let spot_price = bmrng::channel_with_timeout(1, Duration::from_secs(30)); - let quote = bmrng::channel_with_timeout(1, Duration::from_secs(30)); + let execution_setup = bmrng::channel_with_timeout(1, Duration::from_secs(60)); + let transfer_proof = bmrng::channel_with_timeout(1, Duration::from_secs(60)); + let encrypted_signature = bmrng::channel_with_timeout(1, Duration::from_secs(60)); + let spot_price = bmrng::channel_with_timeout(1, Duration::from_secs(60)); + let quote = bmrng::channel_with_timeout(1, Duration::from_secs(60)); let event_loop = EventLoop { swap_id,