Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitcoin p2p: Use different timeouts #2609

Merged
merged 1 commit into from
May 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions core/src/main/java/bisq/core/btc/setup/WalletConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@
// Does the basic wiring
@Slf4j
public class WalletConfig extends AbstractIdleService {
private static final int TIMEOUT = 120 * 1000; // connectTimeoutMillis. 60 sec used in bitcoinj, but for Tor we allow more.
private static final int TOR_SOCKET_TIMEOUT = 120 * 1000; // 1 sec used in bitcoinj, but since bisq uses Tor we allow more.
private static final int TOR_VERSION_EXCHANGE_TIMEOUT = 125 * 1000; // 5 sec used in bitcoinj, but since bisq uses Tor we allow more.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intended to just have a slightly diff. value to TOR_SOCKET_TIMEOUT?



///////////////////////////////////////////////////////////////////////////////////////////
// WalletFactory
Expand Down Expand Up @@ -229,8 +231,8 @@ private PeerGroup createPeerGroup() {

peerGroup = new PeerGroup(params, vChain, blockingClientManager);

blockingClientManager.setConnectTimeoutMillis(TIMEOUT);
peerGroup.setConnectTimeoutMillis(TIMEOUT);
blockingClientManager.setConnectTimeoutMillis(TOR_SOCKET_TIMEOUT);
peerGroup.setConnectTimeoutMillis(TOR_VERSION_EXCHANGE_TIMEOUT);
}

// For dao testnet (server side regtest) we prevent to connect to a localhost node to avoid confusion
Expand Down