mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-27 08:55:22 -04:00
Small fixes for v 0.3.2.1
This commit is contained in:
parent
03b7503b11
commit
f009434530
10 changed files with 22 additions and 126 deletions
|
@ -24,12 +24,7 @@ public class Version {
|
||||||
private static final Logger log = LoggerFactory.getLogger(Version.class);
|
private static final Logger log = LoggerFactory.getLogger(Version.class);
|
||||||
|
|
||||||
// The application versions
|
// The application versions
|
||||||
private static final int MAJOR_VERSION = 0;
|
public static final String VERSION = "0.3.2.1";
|
||||||
private static final int MINOR_VERSION = 3;
|
|
||||||
// used as updateFX index
|
|
||||||
public static final int PATCH_VERSION = 2;
|
|
||||||
|
|
||||||
public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + PATCH_VERSION;
|
|
||||||
|
|
||||||
// The version nr. for the objects sent over the network. A change will break the serialization of old objects.
|
// The version nr. for the objects sent over the network. A change will break the serialization of old objects.
|
||||||
// If objects are used for both network and database the network version is applied.
|
// If objects are used for both network and database the network version is applied.
|
||||||
|
|
|
@ -27,6 +27,7 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -82,11 +83,12 @@ public class ArbitratorService {
|
||||||
|
|
||||||
public Map<Address, Arbitrator> getArbitrators() {
|
public Map<Address, Arbitrator> getArbitrators() {
|
||||||
// TODO java.lang.IllegalStateException: Duplicate key
|
// TODO java.lang.IllegalStateException: Duplicate key
|
||||||
final Map<Address, Arbitrator> arbitratorsMap = p2PService.getDataMap().values().stream()
|
Set<Arbitrator> set = p2PService.getDataMap().values().stream()
|
||||||
.filter(e -> e.expirablePayload instanceof Arbitrator)
|
.filter(e -> e.expirablePayload instanceof Arbitrator)
|
||||||
.map(e -> (Arbitrator) e.expirablePayload)
|
.map(e -> (Arbitrator) e.expirablePayload)
|
||||||
.collect(Collectors.toMap(e -> e.getArbitratorAddress(), e -> e));
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
return arbitratorsMap;
|
return set.stream()
|
||||||
|
.collect(Collectors.toMap(e -> e.getArbitratorAddress(), e -> e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,12 +160,13 @@ public class BitsquareApp extends Application {
|
||||||
stop();
|
stop();
|
||||||
});
|
});
|
||||||
scene.setOnKeyReleased(keyEvent -> {
|
scene.setOnKeyReleased(keyEvent -> {
|
||||||
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(keyEvent) ||
|
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
||||||
new KeyCodeCombination(KeyCode.Q, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
|
||||||
if (BitsquareApp.IS_RELEASE_VERSION)
|
if (BitsquareApp.IS_RELEASE_VERSION)
|
||||||
systemTray.hideStage();
|
systemTray.hideStage();
|
||||||
else
|
else
|
||||||
stop();
|
stop();
|
||||||
|
} else if (new KeyCodeCombination(KeyCode.Q, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
||||||
|
stop();
|
||||||
} else if (new KeyCodeCombination(KeyCode.E, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
} else if (new KeyCodeCombination(KeyCode.E, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
||||||
showEmptyWalletPopup();
|
showEmptyWalletPopup();
|
||||||
} else if (new KeyCodeCombination(KeyCode.M, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
} else if (new KeyCodeCombination(KeyCode.M, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.popups;
|
package io.bitsquare.gui.popups;
|
||||||
|
|
||||||
|
import io.bitsquare.app.BitsquareApp;
|
||||||
import io.bitsquare.common.util.Utilities;
|
import io.bitsquare.common.util.Utilities;
|
||||||
import javafx.geometry.HPos;
|
import javafx.geometry.HPos;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
|
@ -52,7 +53,7 @@ public class WebViewPopup extends Popup {
|
||||||
webView.getEngine().documentProperty().addListener((observable, oldValue, newValue) -> {
|
webView.getEngine().documentProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
String heightInPx = webView.getEngine()
|
String heightInPx = webView.getEngine()
|
||||||
.executeScript("window.getComputedStyle(document.body, null).getPropertyValue('height')").toString();
|
.executeScript("window.getComputedStyle(document.body, null).getPropertyValue('height')").toString();
|
||||||
double height = Double.valueOf(heightInPx.replace("px", "")) * 1.2;
|
double height = Math.min(Double.valueOf(heightInPx.replace("px", "")) * 1.2, BitsquareApp.getPrimaryStage().getHeight());
|
||||||
webView.setPrefHeight(height);
|
webView.setPrefHeight(height);
|
||||||
stage.setMinHeight(height + gridPane.getHeight());
|
stage.setMinHeight(height + gridPane.getHeight());
|
||||||
centerPopup();
|
centerPopup();
|
||||||
|
|
|
@ -166,9 +166,6 @@ public class PeerGroup implements MessageListener, ConnectionListener {
|
||||||
Log.traceCall(message.toString());
|
Log.traceCall(message.toString());
|
||||||
Address peerAddress = message.address;
|
Address peerAddress = message.address;
|
||||||
|
|
||||||
checkArgument(!authenticatedPeers.containsKey(peerAddress),
|
|
||||||
"We have that peer already authenticated. That must never happen.");
|
|
||||||
|
|
||||||
AuthenticationHandshake authenticationHandshake;
|
AuthenticationHandshake authenticationHandshake;
|
||||||
if (!authenticationHandshakes.containsKey(peerAddress)) {
|
if (!authenticationHandshakes.containsKey(peerAddress)) {
|
||||||
// We protect that connection from getting closed by maintenance cleanup...
|
// We protect that connection from getting closed by maintenance cleanup...
|
||||||
|
@ -224,8 +221,6 @@ public class PeerGroup implements MessageListener, ConnectionListener {
|
||||||
// reached our max connection size.
|
// reached our max connection size.
|
||||||
private void authenticateToSeedNode(Set<Address> remainingAddresses, Address peerAddress, boolean connectToReportedAfterSuccess) {
|
private void authenticateToSeedNode(Set<Address> remainingAddresses, Address peerAddress, boolean connectToReportedAfterSuccess) {
|
||||||
Log.traceCall(peerAddress.getFullAddress());
|
Log.traceCall(peerAddress.getFullAddress());
|
||||||
checkArgument(!authenticatedPeers.containsKey(peerAddress),
|
|
||||||
"We have that peer already authenticated. That must never happen.");
|
|
||||||
if (!authenticationHandshakes.containsKey(peerAddress)) {
|
if (!authenticationHandshakes.containsKey(peerAddress)) {
|
||||||
AuthenticationHandshake authenticationHandshake = new AuthenticationHandshake(networkNode, this, getMyAddress(), peerAddress);
|
AuthenticationHandshake authenticationHandshake = new AuthenticationHandshake(networkNode, this, getMyAddress(), peerAddress);
|
||||||
authenticationHandshakes.put(peerAddress, authenticationHandshake);
|
authenticationHandshakes.put(peerAddress, authenticationHandshake);
|
||||||
|
@ -338,8 +333,6 @@ public class PeerGroup implements MessageListener, ConnectionListener {
|
||||||
private void authenticateToReportedPeer(ReportedPeer reportedPeer) {
|
private void authenticateToReportedPeer(ReportedPeer reportedPeer) {
|
||||||
Log.traceCall(reportedPeer.toString());
|
Log.traceCall(reportedPeer.toString());
|
||||||
final Address reportedPeerAddress = reportedPeer.address;
|
final Address reportedPeerAddress = reportedPeer.address;
|
||||||
checkArgument(!authenticatedPeers.containsKey(reportedPeerAddress),
|
|
||||||
"We have that peer already authenticated. That must never happen.");
|
|
||||||
if (!authenticationHandshakes.containsKey(reportedPeerAddress)) {
|
if (!authenticationHandshakes.containsKey(reportedPeerAddress)) {
|
||||||
AuthenticationHandshake authenticationHandshake = new AuthenticationHandshake(networkNode, this, getMyAddress(), reportedPeerAddress);
|
AuthenticationHandshake authenticationHandshake = new AuthenticationHandshake(networkNode, this, getMyAddress(), reportedPeerAddress);
|
||||||
authenticationHandshakes.put(reportedPeerAddress, authenticationHandshake);
|
authenticationHandshakes.put(reportedPeerAddress, authenticationHandshake);
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<key>JVMAppClasspath</key>
|
<key>JVMAppClasspath</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>JVMMainJarName</key>
|
<key>JVMMainJarName</key>
|
||||||
<string>2.jar</string>
|
<string>shaded.jar</string>
|
||||||
<key>JVMPreferencesID</key>
|
<key>JVMPreferencesID</key>
|
||||||
<string>bitsquare</string>
|
<string>bitsquare</string>
|
||||||
<key>JVMOptions</key>
|
<key>JVMOptions</key>
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
<?xml version="1.0" ?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>LSMinimumSystemVersion</key>
|
|
||||||
<string>10.7.4</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>English</string>
|
|
||||||
<key>CFBundleAllowMixedLocalizations</key>
|
|
||||||
<true/>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>Bitsquare</string>
|
|
||||||
<key>CFBundleIconFile</key>
|
|
||||||
<string>package/mac/Bitsquare.icns</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>io.bitsquare.Bitsquare</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>Bitsquare</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1</string>
|
|
||||||
|
|
||||||
<!-- CFBundleSignature exists only for compatibility with Classic Mac OS apps and documents. Modern Mac OS X apps don't need to worry about assigning a Bundle Signature.-->
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
|
|
||||||
<key>LSApplicationCategoryType</key>
|
|
||||||
<string>public.app-category.finance</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1</string>
|
|
||||||
<key>NSHumanReadableCopyright</key>
|
|
||||||
<string>Copyright (C) 2015</string>
|
|
||||||
|
|
||||||
<key>NSHighResolutionCapable</key>
|
|
||||||
<string>true</string>
|
|
||||||
|
|
||||||
<key>JVMRuntime</key>
|
|
||||||
<string>..</string>
|
|
||||||
<key>JVMMainClassName</key>
|
|
||||||
<string>io.bitsquare.app.core.BitsquareAppMain</string>
|
|
||||||
<key>JVMAppClasspath</key>
|
|
||||||
<string></string>
|
|
||||||
<key>JVMMainJarName</key>
|
|
||||||
<string>JAR_NAME_STRING_GOES_HERE</string>
|
|
||||||
<key>JVMPreferencesID</key>
|
|
||||||
<string>bitsquare</string>
|
|
||||||
<key>JVMOptions</key>
|
|
||||||
<array>
|
|
||||||
</array>
|
|
||||||
<key>JVMUserOptions</key>
|
|
||||||
<dict>
|
|
||||||
</dict>
|
|
||||||
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
|
@ -5,28 +5,7 @@ mkdir -p gui/deploy
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Extract the version numbers.
|
fullVersion="0.3.2.1"
|
||||||
majorVersion=$( sed -n 's/^.*final int MAJOR_VERSION = //p' common/src/main/java/io/bitsquare/app/Version.java )
|
|
||||||
minorVersion=$( sed -n 's/^.*final int MINOR_VERSION = //p' common/src/main/java/io/bitsquare/app/Version.java )
|
|
||||||
patchVersion=$( sed -n 's/^.*final int PATCH_VERSION = //p' common/src/main/java/io/bitsquare/app/Version.java )
|
|
||||||
|
|
||||||
# remove trailing;
|
|
||||||
majorVersion="${majorVersion:0:${#majorVersion}-1}"
|
|
||||||
minorVersion="${minorVersion:0:${#minorVersion}-1}"
|
|
||||||
patchVersion="${patchVersion:0:${#patchVersion}-1}"
|
|
||||||
|
|
||||||
fullVersion=$( sed -n 's/^.*final String VERSION = "//p' common/src/main/java/io/bitsquare/app/Version.java )
|
|
||||||
# remove trailing ";
|
|
||||||
fullVersion=$majorVersion.$minorVersion.$patchVersion
|
|
||||||
|
|
||||||
echo majorVersion = $majorVersion
|
|
||||||
echo minorVersion = $minorVersion
|
|
||||||
echo patchVersion = $patchVersion
|
|
||||||
echo fullVersion = $fullVersion
|
|
||||||
|
|
||||||
# Generate the plist from the template
|
|
||||||
sed "s|JAR_NAME_STRING_GOES_HERE|$patchVersion.jar|" package/mac/Info.template.plist >package/mac/Info.plist
|
|
||||||
|
|
||||||
|
|
||||||
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
|
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
|
||||||
cp gui/target/shaded.jar gui/deploy/Bitsquare.jar
|
cp gui/target/shaded.jar gui/deploy/Bitsquare.jar
|
||||||
|
@ -43,9 +22,12 @@ $JAVA_HOME/bin/javapackager \
|
||||||
-title Bitsquare \
|
-title Bitsquare \
|
||||||
-vendor Bitsquare \
|
-vendor Bitsquare \
|
||||||
-outdir gui/deploy \
|
-outdir gui/deploy \
|
||||||
-srcfiles gui/target/shaded.jar \
|
-srcfiles gui/deploy/Bitsquare.jar \
|
||||||
-appclass io.bitsquare.app.BitsquareAppMain \
|
-appclass io.bitsquare.app.BitsquareAppMain \
|
||||||
-outfile Bitsquare \
|
-outfile Bitsquare \
|
||||||
-BjvmProperties=-Djava.net.preferIPv4Stack=true
|
-BjvmProperties=-Djava.net.preferIPv4Stack=true
|
||||||
|
|
||||||
|
cp gui/deploy/Bitsquare.jar /Users/mk/vm_shared_ubuntu/Bitsquare.jar
|
||||||
|
cp gui/deploy/Bitsquare.jar /Users/mk/vm_shared_windows/Bitsquare.jar
|
||||||
|
|
||||||
cd package/mac
|
cd package/mac
|
|
@ -65,7 +65,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||||
<shadedClassifierName>bundled</shadedClassifierName>
|
<shadedClassifierName>bundled</shadedClassifierName>
|
||||||
<finalName>SeedNodeMain</finalName>
|
<finalName>SeedNode</finalName>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
@ -10,8 +10,6 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.security.Security;
|
import java.security.Security;
|
||||||
import java.util.Scanner;
|
|
||||||
import java.util.Timer;
|
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.ThreadFactory;
|
import java.util.concurrent.ThreadFactory;
|
||||||
|
|
||||||
|
@ -62,29 +60,11 @@ public class SeedNodeMain {
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
listenForExitCommand();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void listenForExitCommand() {
|
while (true) {
|
||||||
Scanner scan = new Scanner(System.in);
|
try {
|
||||||
String line;
|
Thread.sleep(Long.MAX_VALUE);
|
||||||
while (!stopped && !Thread.currentThread().isInterrupted() && ((line = scan.nextLine()) != null)) {
|
} catch (InterruptedException e) {
|
||||||
if (line.equals("q")) {
|
|
||||||
if (!stopped) {
|
|
||||||
stopped = true;
|
|
||||||
Timer timeout = UserThread.runAfter(() -> {
|
|
||||||
log.error("Timeout occurred at shutDown request");
|
|
||||||
System.exit(1);
|
|
||||||
}, 5);
|
|
||||||
|
|
||||||
if (seedNode != null) {
|
|
||||||
UserThread.execute(() -> seedNode.shutDown(() -> {
|
|
||||||
timeout.cancel();
|
|
||||||
log.debug("Shutdown seed node complete.");
|
|
||||||
System.exit(0);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue