mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Don't use SeedPeers for testnet
This commit is contained in:
parent
17bb2ae974
commit
a4136631ed
@ -57,7 +57,7 @@ public class BitcoinNodes {
|
||||
}
|
||||
|
||||
public boolean useProvidedBtcNodes() {
|
||||
return BisqEnvironment.getBaseCurrencyNetwork().isBitcoin() && BisqEnvironment.getBaseCurrencyNetwork().isBitcoin();
|
||||
return BisqEnvironment.getBaseCurrencyNetwork().isBitcoin() && BisqEnvironment.getBaseCurrencyNetwork().isMainnet();
|
||||
}
|
||||
|
||||
@Getter
|
||||
|
@ -177,6 +177,10 @@ public class NetworkSettingsView extends ActivatableViewAndModel<GridPane, Activ
|
||||
selectedBitcoinNodesOption = BitcoinNodes.BitcoinNodesOption.PROVIDED;
|
||||
preferences.setBitcoinNodesOptionOrdinal(selectedBitcoinNodesOption.ordinal());
|
||||
}
|
||||
if (!bitcoinNodes.useProvidedBtcNodes()) {
|
||||
selectedBitcoinNodesOption = BitcoinNodes.BitcoinNodesOption.PUBLIC;
|
||||
preferences.setBitcoinNodesOptionOrdinal(selectedBitcoinNodesOption.ordinal());
|
||||
}
|
||||
|
||||
selectBitcoinPeersToggle();
|
||||
onBitcoinPeersToggleSelected(false);
|
||||
@ -378,7 +382,7 @@ public class NetworkSettingsView extends ActivatableViewAndModel<GridPane, Activ
|
||||
btcNodesLabel.setDisable(true);
|
||||
if (calledFromUser)
|
||||
showShutDownPopup();
|
||||
}else{
|
||||
} else {
|
||||
selectedBitcoinNodesOption = BitcoinNodes.BitcoinNodesOption.PUBLIC;
|
||||
preferences.setBitcoinNodesOptionOrdinal(selectedBitcoinNodesOption.ordinal());
|
||||
selectBitcoinPeersToggle();
|
||||
|
@ -23,6 +23,7 @@ import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.net.discovery.PeerDiscovery;
|
||||
import org.bitcoinj.net.discovery.PeerDiscoveryException;
|
||||
import org.bitcoinj.net.discovery.SeedPeers;
|
||||
import org.bitcoinj.params.MainNetParams;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.ArrayList;
|
||||
@ -59,7 +60,8 @@ public class Socks5MultiDiscovery implements PeerDiscovery {
|
||||
if ((mode & SOCKS5_DISCOVER_ONION) != 0)
|
||||
discoveryList.add(new Socks5SeedOnionDiscovery(proxy, params));
|
||||
|
||||
if ((mode & SOCKS5_DISCOVER_ADDR) != 0)
|
||||
// Testnet has no addrSeeds so SeedPeers is not supported (would throw a nullPointer)
|
||||
if ((mode & SOCKS5_DISCOVER_ADDR) != 0 && params == MainNetParams.get())
|
||||
// note: SeedPeers does not perform any network operations, so does not use proxy.
|
||||
discoveryList.add(new SeedPeers(params));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user