mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Prevent connection to localhost bitcoin node if dao testnet is used (fix)
This commit is contained in:
parent
518fe724d9
commit
0561c12a90
1 changed files with 14 additions and 11 deletions
|
@ -209,9 +209,12 @@ public class WalletConfig extends AbstractIdleService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private PeerGroup createPeerGroup() {
|
private PeerGroup createPeerGroup() {
|
||||||
|
PeerGroup peerGroup;
|
||||||
// no proxy case.
|
// no proxy case.
|
||||||
if (socks5Proxy == null) {
|
if (socks5Proxy == null) {
|
||||||
return new PeerGroup(params, vChain);
|
peerGroup = new PeerGroup(params, vChain);
|
||||||
|
// For dao testnet (server side regtest) we prevent to connect to a localhost node to avoid confusion
|
||||||
|
// if local btc node is not synced with our dao testnet master node.
|
||||||
} else {
|
} else {
|
||||||
// proxy case (tor).
|
// proxy case (tor).
|
||||||
Proxy proxy = new Proxy(Proxy.Type.SOCKS,
|
Proxy proxy = new Proxy(Proxy.Type.SOCKS,
|
||||||
|
@ -224,10 +227,11 @@ public class WalletConfig extends AbstractIdleService {
|
||||||
new BlockingClientManager() :
|
new BlockingClientManager() :
|
||||||
new BlockingClientManager(proxySocketFactory);
|
new BlockingClientManager(proxySocketFactory);
|
||||||
|
|
||||||
PeerGroup peerGroup = new PeerGroup(params, vChain, blockingClientManager);
|
peerGroup = new PeerGroup(params, vChain, blockingClientManager);
|
||||||
|
|
||||||
blockingClientManager.setConnectTimeoutMillis(TIMEOUT);
|
blockingClientManager.setConnectTimeoutMillis(TIMEOUT);
|
||||||
peerGroup.setConnectTimeoutMillis(TIMEOUT);
|
peerGroup.setConnectTimeoutMillis(TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
// For dao testnet (server side regtest) we prevent to connect to a localhost node to avoid confusion
|
// For dao testnet (server side regtest) we prevent to connect to a localhost node to avoid confusion
|
||||||
// if local btc node is not synced with our dao testnet master node.
|
// if local btc node is not synced with our dao testnet master node.
|
||||||
|
@ -236,7 +240,6 @@ public class WalletConfig extends AbstractIdleService {
|
||||||
|
|
||||||
return peerGroup;
|
return peerGroup;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will only connect to the given addresses. Cannot be called after startup.
|
* Will only connect to the given addresses. Cannot be called after startup.
|
||||||
|
|
Loading…
Add table
Reference in a new issue