Skip to content

Commit

Permalink
Merge pull request #3783 from ripcurlx/only-connect-to-localhost-when…
Browse files Browse the repository at this point in the history
…-detected

Not allow bitcoinj to auto connect to localhost when localhost was not detected by client
  • Loading branch information
sqrrm authored Dec 16, 2019
2 parents 14bec2f + 26291eb commit 65d3dd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 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 @@ -216,8 +216,6 @@ private PeerGroup createPeerGroup() {
// no proxy case.
if (socks5Proxy == null) {
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 {
// proxy case (tor).
Proxy proxy = new Proxy(Proxy.Type.SOCKS,
Expand All @@ -238,7 +236,9 @@ private PeerGroup createPeerGroup() {

// 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 (BisqEnvironment.getBaseCurrencyNetwork().isDaoRegTest() || BisqEnvironment.getBaseCurrencyNetwork().isDaoTestNet())
if (BisqEnvironment.getBaseCurrencyNetwork().isDaoRegTest() ||
BisqEnvironment.getBaseCurrencyNetwork().isDaoTestNet() ||
!bisqEnvironment.isBitcoinLocalhostNodeRunning())
peerGroup.setUseLocalhostPeerWhenPossible(false);

return peerGroup;
Expand Down

0 comments on commit 65d3dd3

Please sign in to comment.