diff --git a/build.gradle b/build.gradle index 5314ccbc86..6c89da38c5 100644 --- a/build.gradle +++ b/build.gradle @@ -40,7 +40,7 @@ configure(subprojects) { grpcVersion = '1.25.0' gsonVersion = '2.8.5' guavaVersion = '28.2-jre' - moneroJavaVersion = '0.5.11' + moneroJavaVersion = '0.6.0' httpclient5Version = '5.0' guiceVersion = '4.2.2' hamcrestVersion = '1.3' diff --git a/core/src/main/java/bisq/core/btc/setup/WalletsSetup.java b/core/src/main/java/bisq/core/btc/setup/WalletsSetup.java index e7f1a7470f..8f33042934 100644 --- a/core/src/main/java/bisq/core/btc/setup/WalletsSetup.java +++ b/core/src/main/java/bisq/core/btc/setup/WalletsSetup.java @@ -100,7 +100,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import monero.daemon.MoneroDaemon; -import monero.daemon.model.MoneroDaemonConnection; +import monero.daemon.model.MoneroPeer; import monero.wallet.MoneroWallet; // Setup wallets and use WalletConfig for BitcoinJ wiring. @@ -136,7 +136,7 @@ public class WalletsSetup { private final int socks5DiscoverMode; private final IntegerProperty numPeers = new SimpleIntegerProperty(0); private final LongProperty chainHeight = new SimpleLongProperty(0); - private final ObjectProperty> peerConnections = new SimpleObjectProperty<>(); + private final ObjectProperty> peers = new SimpleObjectProperty<>(); private final DownloadListener downloadListener = new DownloadListener(); private final List setupCompletedHandlers = new ArrayList<>(); public final BooleanProperty shutDownComplete = new SimpleBooleanProperty(); @@ -220,8 +220,8 @@ public class WalletsSetup { peerGroup.setAddPeersFromAddressMessage(false); UserThread.runPeriodically(() -> { - peerConnections.set(getPeerConnections()); - numPeers.set(peerConnections.get().size()); + peers.set(getPeerConnections()); + numPeers.set(peers.get().size()); chainHeight.set(vXmrDaemon.getHeight()); }, DAEMON_POLL_INTERVAL_SECONDS); @@ -240,8 +240,8 @@ public class WalletsSetup { // Map to user thread UserThread.execute(() -> { - peerConnections.set(getPeerConnections()); - numPeers.set(peerConnections.get().size()); + peers.set(getPeerConnections()); + numPeers.set(peers.get().size()); chainHeight.set(vXmrDaemon.getHeight()); addressEntryList.onWalletReady(walletConfig.btcWallet()); xmrAddressEntryList.onWalletReady(walletConfig.getXmrWallet()); @@ -253,9 +253,9 @@ public class WalletsSetup { UserThread.runAfter(resultHandler::handleResult, 100, TimeUnit.MILLISECONDS); } - private List getPeerConnections() { - return vXmrDaemon.getConnections().stream() - .filter(peerConnection -> peerConnection.getPeer().isOnline()) + private List getPeerConnections() { + return vXmrDaemon.getPeers().stream() + .filter(peer -> peer.isOnline()) .collect(Collectors.toList()); } }; @@ -506,8 +506,8 @@ public class WalletsSetup { return numPeers; } - public ReadOnlyObjectProperty> peerConnectionsProperty() { - return peerConnections; + public ReadOnlyObjectProperty> peerConnectionsProperty() { + return peers; } public LongProperty chainHeightProperty() { diff --git a/desktop/src/main/java/bisq/desktop/main/settings/network/MoneroNetworkListItem.java b/desktop/src/main/java/bisq/desktop/main/settings/network/MoneroNetworkListItem.java index 04687f1981..b1fc41fa66 100644 --- a/desktop/src/main/java/bisq/desktop/main/settings/network/MoneroNetworkListItem.java +++ b/desktop/src/main/java/bisq/desktop/main/settings/network/MoneroNetworkListItem.java @@ -17,17 +17,17 @@ package bisq.desktop.main.settings.network; -import monero.daemon.model.MoneroDaemonConnection; +import monero.daemon.model.MoneroPeer; public class MoneroNetworkListItem { - private final MoneroDaemonConnection peerConnection; + private final MoneroPeer peer; - public MoneroNetworkListItem(MoneroDaemonConnection peerConnection) { - this.peerConnection = peerConnection; + public MoneroNetworkListItem(MoneroPeer peer) { + this.peer = peer; } public String getOnionAddress() { - return peerConnection.getPeer().getHost() + ":" + peerConnection.getPeer().getPort(); + return peer.getHost() + ":" + peer.getPort(); } public String getVersion() { @@ -39,6 +39,6 @@ public class MoneroNetworkListItem { } public String getHeight() { - return String.valueOf(peerConnection.getHeight()); + return String.valueOf(peer.getHeight()); } } diff --git a/desktop/src/main/java/bisq/desktop/main/settings/network/NetworkSettingsView.java b/desktop/src/main/java/bisq/desktop/main/settings/network/NetworkSettingsView.java index be227a325a..bb2ee347d8 100644 --- a/desktop/src/main/java/bisq/desktop/main/settings/network/NetworkSettingsView.java +++ b/desktop/src/main/java/bisq/desktop/main/settings/network/NetworkSettingsView.java @@ -77,7 +77,7 @@ import java.util.stream.Collectors; import static javafx.beans.binding.Bindings.createStringBinding; -import monero.daemon.model.MoneroDaemonConnection; +import monero.daemon.model.MoneroPeer; @FxmlView public class NetworkSettingsView extends ActivatableView { @@ -480,9 +480,9 @@ public class NetworkSettingsView extends ActivatableView { .collect(Collectors.toList())); } - private void updateMoneroPeersTable(List peerConnections) { + private void updateMoneroPeersTable(List peers) { moneroNetworkListItems.clear(); - moneroNetworkListItems.setAll(peerConnections.stream() + moneroNetworkListItems.setAll(peers.stream() .map(MoneroNetworkListItem::new) .collect(Collectors.toList())); }