mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Cleanups
This commit is contained in:
parent
fa07957c24
commit
96138e759b
@ -272,7 +272,7 @@ public class NetworkSettingsView extends ActivatableViewAndModel<GridPane, Activ
|
||||
nodeAddressSubscription = EasyBind.subscribe(p2PService.getNetworkNode().nodeAddressProperty(),
|
||||
nodeAddress -> onionAddress.setText(nodeAddress == null ?
|
||||
Res.get("settings.net.notKnownYet") :
|
||||
p2PService.getAddress().getFullAddress()));
|
||||
nodeAddress.getFullAddress()));
|
||||
numP2PPeersSubscription = EasyBind.subscribe(p2PService.getNumConnectedPeers(), numPeers -> updateP2PTable());
|
||||
totalTrafficTextField.textProperty().bind(EasyBind.combine(Statistic.totalSentBytesProperty(),
|
||||
Statistic.totalReceivedBytesProperty(),
|
||||
|
@ -455,9 +455,4 @@ public abstract class NetworkNode implements MessageListener {
|
||||
public NodeAddress getNodeAddress() {
|
||||
return nodeAddressProperty.get();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ObjectProperty<NodeAddress> getNodeAddressProperty() {
|
||||
return nodeAddressProperty;
|
||||
}
|
||||
}
|
||||
|
@ -35,8 +35,6 @@ import bisq.common.proto.network.NetworkEnvelope;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@ -119,15 +117,13 @@ public class RequestDataManager implements MessageListener, ConnectionListener,
|
||||
|
||||
this.seedNodeAddresses = new HashSet<>(seedNodeRepository.getSeedNodeAddresses());
|
||||
|
||||
this.networkNode.getNodeAddressProperty().addListener(observable -> {
|
||||
|
||||
NodeAddress myAddress = (NodeAddress) ((SimpleObjectProperty) observable).get();
|
||||
|
||||
seedNodeAddresses.remove(myAddress);
|
||||
|
||||
if (myAddress != null && seedNodeRepository.isSeedNode(myAddress)) {
|
||||
NUM_SEEDS_FOR_PRELIMINARY_REQUEST = 3;
|
||||
NUM_ADDITIONAL_SEEDS_FOR_UPDATE_REQUEST = 2;
|
||||
this.networkNode.nodeAddressProperty().addListener((observable, oldValue, myAddress) -> {
|
||||
if (myAddress != null) {
|
||||
seedNodeAddresses.remove(myAddress);
|
||||
if (seedNodeRepository.isSeedNode(myAddress)) {
|
||||
NUM_SEEDS_FOR_PRELIMINARY_REQUEST = 3;
|
||||
NUM_ADDITIONAL_SEEDS_FOR_UPDATE_REQUEST = 2;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user