mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 10:22:18 +01:00
setAddPeersFromAddressMessage
This commit is contained in:
parent
60c1394b22
commit
524a176305
@ -152,7 +152,13 @@ public class WalletsSetup {
|
||||
//We are here in the btcj thread Thread[ STARTING,5,main]
|
||||
super.onSetupCompleted();
|
||||
|
||||
walletConfig.peerGroup().addEventListener(new PeerEventListener() {
|
||||
final PeerGroup peerGroup = walletConfig.peerGroup();
|
||||
|
||||
// We don't want to get our node white list polluted with nodes from AddressMessage calls.
|
||||
if (preferences.getBitcoinNodes() != null && !preferences.getBitcoinNodes().isEmpty())
|
||||
peerGroup.setAddPeersFromAddressMessage(false);
|
||||
|
||||
peerGroup.addEventListener(new PeerEventListener() {
|
||||
@Override
|
||||
public void onPeersDiscovered(Set<PeerAddress> peerAddresses) {
|
||||
}
|
||||
@ -169,14 +175,14 @@ public class WalletsSetup {
|
||||
public void onPeerConnected(Peer peer, int peerCount) {
|
||||
// We get called here on our user thread
|
||||
numPeers.set(peerCount);
|
||||
connectedPeers.set(walletConfig.peerGroup().getConnectedPeers());
|
||||
connectedPeers.set(peerGroup.getConnectedPeers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPeerDisconnected(Peer peer, int peerCount) {
|
||||
// We get called here on our user thread
|
||||
numPeers.set(peerCount);
|
||||
connectedPeers.set(walletConfig.peerGroup().getConnectedPeers());
|
||||
connectedPeers.set(peerGroup.getConnectedPeers());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -315,9 +315,6 @@ public final class Preferences implements Persistable {
|
||||
|
||||
if (btcNodesFromOptions != null && !btcNodesFromOptions.isEmpty())
|
||||
setBitcoinNodes(btcNodesFromOptions);
|
||||
|
||||
if (bitcoinNodes.equals("127.0.0.1") || bitcoinNodes.equals("localhost"))
|
||||
setUseTorForBitcoinJ(false);
|
||||
}
|
||||
|
||||
public void dontShowAgain(String key, boolean dontShowAgain) {
|
||||
@ -603,7 +600,13 @@ public final class Preferences implements Persistable {
|
||||
}
|
||||
|
||||
public boolean getUseTorForBitcoinJ() {
|
||||
return useTorForBitcoinJ;
|
||||
// We override the useTorForBitcoinJ and set to false if we have bitcoinNodes set
|
||||
// Atm we don't support onion addresses there
|
||||
// This check includes localhost, so we also override useTorForBitcoinJ
|
||||
if (bitcoinNodes != null && !bitcoinNodes.isEmpty())
|
||||
return false;
|
||||
else
|
||||
return useTorForBitcoinJ;
|
||||
}
|
||||
|
||||
public boolean getShowOwnOffersInOfferBook() {
|
||||
|
Loading…
Reference in New Issue
Block a user