mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 07:15:54 -04:00
Deactivate relay mode
This commit is contained in:
parent
74bedff837
commit
bc39d4d315
@ -46,7 +46,6 @@ import net.tomp2p.futures.BaseFutureListener;
|
||||
import net.tomp2p.futures.FutureBootstrap;
|
||||
import net.tomp2p.futures.FutureDiscover;
|
||||
import net.tomp2p.nat.FutureNAT;
|
||||
import net.tomp2p.nat.FutureRelayNAT;
|
||||
import net.tomp2p.nat.PeerBuilderNAT;
|
||||
import net.tomp2p.nat.PeerNAT;
|
||||
import net.tomp2p.p2p.Peer;
|
||||
@ -55,7 +54,6 @@ import net.tomp2p.peers.Number160;
|
||||
import net.tomp2p.peers.PeerAddress;
|
||||
import net.tomp2p.peers.PeerMapChangeListener;
|
||||
import net.tomp2p.peers.PeerStatistic;
|
||||
import net.tomp2p.relay.RelayConfig;
|
||||
import net.tomp2p.replication.IndirectReplication;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -192,9 +190,9 @@ class BootstrappedPeerFactory {
|
||||
|
||||
switch (lastSuccessfulBootstrap) {
|
||||
// For the moment we don't support relay mode as it has too much problems
|
||||
case RELAY_SUCCESS:
|
||||
/* case RELAY_SUCCESS:
|
||||
bootstrapWithRelay();
|
||||
break;
|
||||
break;*/
|
||||
case AUTO_PORT_FORWARDING_SUCCESS:
|
||||
tryPortForwarding();
|
||||
break;
|
||||
@ -268,16 +266,16 @@ class BootstrappedPeerFactory {
|
||||
discoverAfterPortForwarding();
|
||||
}
|
||||
else {
|
||||
/* handleError(BootstrapState.AUTO_PORT_FORWARDING_FAILED, "Automatic port forwarding failed. " +
|
||||
handleError(BootstrapState.AUTO_PORT_FORWARDING_FAILED, "Automatic port forwarding failed. " +
|
||||
"Fail reason: " + future.failedReason() +
|
||||
"\nCheck if UPnP is not enabled on your router. " +
|
||||
"\nYou can try also to setup manual port forwarding. " +
|
||||
"\nRelay mode is currently not supported but will follow later. ");*/
|
||||
"\nRelay mode is currently not supported but will follow later. ");
|
||||
|
||||
// For the moment we don't support relay mode as it has too much problems
|
||||
setState(BootstrapState.AUTO_PORT_FORWARDING_NOT_SUCCEEDED, "Port forwarding has failed. " +
|
||||
/* setState(BootstrapState.AUTO_PORT_FORWARDING_NOT_SUCCEEDED, "Port forwarding has failed. " +
|
||||
"We try to use a relay as next step.");
|
||||
bootstrapWithRelay();
|
||||
bootstrapWithRelay();*/
|
||||
}
|
||||
}
|
||||
|
||||
@ -316,7 +314,7 @@ class BootstrappedPeerFactory {
|
||||
|
||||
// For the moment we don't support relay mode as it has too much problems
|
||||
// 3. Attempt: We try to use another peer as relay
|
||||
private void bootstrapWithRelay() {
|
||||
/* private void bootstrapWithRelay() {
|
||||
setState(BootstrapState.RELAY_INIT, "We try to use another peer as relay.");
|
||||
FutureDiscover futureDiscover = peer.discover().peerAddress(getBootstrapAddress()).start();
|
||||
PeerNAT peerNAT = new PeerBuilderNAT(peer).start();
|
||||
@ -340,7 +338,7 @@ class BootstrappedPeerFactory {
|
||||
handleError(BootstrapState.RELAY_FAILED, "Exception at bootstrapWithRelay: " + t.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
}*/
|
||||
|
||||
private void bootstrap(BootstrapState state) {
|
||||
FutureBootstrap futureBootstrap = peer.bootstrap().peerAddress(getBootstrapAddress()).start();
|
||||
|
Loading…
x
Reference in New Issue
Block a user