mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-20 15:55:54 -04:00
Small fixes for v 0.3.2.1
This commit is contained in:
parent
03b7503b11
commit
f009434530
@ -24,12 +24,7 @@ public class Version {
|
||||
private static final Logger log = LoggerFactory.getLogger(Version.class);
|
||||
|
||||
// The application versions
|
||||
private static final int MAJOR_VERSION = 0;
|
||||
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;
|
||||
public static final String VERSION = "0.3.2.1";
|
||||
|
||||
// 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.
|
||||
|
@ -27,6 +27,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -82,11 +83,12 @@ public class ArbitratorService {
|
||||
|
||||
public Map<Address, Arbitrator> getArbitrators() {
|
||||
// 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)
|
||||
.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();
|
||||
});
|
||||
scene.setOnKeyReleased(keyEvent -> {
|
||||
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(keyEvent) ||
|
||||
new KeyCodeCombination(KeyCode.Q, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
||||
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
||||
if (BitsquareApp.IS_RELEASE_VERSION)
|
||||
systemTray.hideStage();
|
||||
else
|
||||
stop();
|
||||
} else if (new KeyCodeCombination(KeyCode.Q, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
||||
stop();
|
||||
} else if (new KeyCodeCombination(KeyCode.E, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
||||
showEmptyWalletPopup();
|
||||
} else if (new KeyCodeCombination(KeyCode.M, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) {
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
package io.bitsquare.gui.popups;
|
||||
|
||||
import io.bitsquare.app.BitsquareApp;
|
||||
import io.bitsquare.common.util.Utilities;
|
||||
import javafx.geometry.HPos;
|
||||
import javafx.geometry.Insets;
|
||||
@ -52,7 +53,7 @@ public class WebViewPopup extends Popup {
|
||||
webView.getEngine().documentProperty().addListener((observable, oldValue, newValue) -> {
|
||||
String heightInPx = webView.getEngine()
|
||||
.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);
|
||||
stage.setMinHeight(height + gridPane.getHeight());
|
||||
centerPopup();
|
||||
|
@ -166,9 +166,6 @@ public class PeerGroup implements MessageListener, ConnectionListener {
|
||||
Log.traceCall(message.toString());
|
||||
Address peerAddress = message.address;
|
||||
|
||||
checkArgument(!authenticatedPeers.containsKey(peerAddress),
|
||||
"We have that peer already authenticated. That must never happen.");
|
||||
|
||||
AuthenticationHandshake authenticationHandshake;
|
||||
if (!authenticationHandshakes.containsKey(peerAddress)) {
|
||||
// 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.
|
||||
private void authenticateToSeedNode(Set<Address> remainingAddresses, Address peerAddress, boolean connectToReportedAfterSuccess) {
|
||||
Log.traceCall(peerAddress.getFullAddress());
|
||||
checkArgument(!authenticatedPeers.containsKey(peerAddress),
|
||||
"We have that peer already authenticated. That must never happen.");
|
||||
if (!authenticationHandshakes.containsKey(peerAddress)) {
|
||||
AuthenticationHandshake authenticationHandshake = new AuthenticationHandshake(networkNode, this, getMyAddress(), peerAddress);
|
||||
authenticationHandshakes.put(peerAddress, authenticationHandshake);
|
||||
@ -338,8 +333,6 @@ public class PeerGroup implements MessageListener, ConnectionListener {
|
||||
private void authenticateToReportedPeer(ReportedPeer reportedPeer) {
|
||||
Log.traceCall(reportedPeer.toString());
|
||||
final Address reportedPeerAddress = reportedPeer.address;
|
||||
checkArgument(!authenticatedPeers.containsKey(reportedPeerAddress),
|
||||
"We have that peer already authenticated. That must never happen.");
|
||||
if (!authenticationHandshakes.containsKey(reportedPeerAddress)) {
|
||||
AuthenticationHandshake authenticationHandshake = new AuthenticationHandshake(networkNode, this, getMyAddress(), reportedPeerAddress);
|
||||
authenticationHandshakes.put(reportedPeerAddress, authenticationHandshake);
|
||||
|
@ -44,7 +44,7 @@
|
||||
<key>JVMAppClasspath</key>
|
||||
<string></string>
|
||||
<key>JVMMainJarName</key>
|
||||
<string>2.jar</string>
|
||||
<string>shaded.jar</string>
|
||||
<key>JVMPreferencesID</key>
|
||||
<string>bitsquare</string>
|
||||
<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
|
||||
|
||||
# Extract the version numbers.
|
||||
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
|
||||
|
||||
fullVersion="0.3.2.1"
|
||||
|
||||
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
|
||||
cp gui/target/shaded.jar gui/deploy/Bitsquare.jar
|
||||
@ -43,9 +22,12 @@ $JAVA_HOME/bin/javapackager \
|
||||
-title Bitsquare \
|
||||
-vendor Bitsquare \
|
||||
-outdir gui/deploy \
|
||||
-srcfiles gui/target/shaded.jar \
|
||||
-srcfiles gui/deploy/Bitsquare.jar \
|
||||
-appclass io.bitsquare.app.BitsquareAppMain \
|
||||
-outfile Bitsquare \
|
||||
-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
|
@ -65,7 +65,7 @@
|
||||
<configuration>
|
||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
<shadedClassifierName>bundled</shadedClassifierName>
|
||||
<finalName>SeedNodeMain</finalName>
|
||||
<finalName>SeedNode</finalName>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
@ -10,8 +10,6 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.Security;
|
||||
import java.util.Scanner;
|
||||
import java.util.Timer;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
@ -62,29 +60,11 @@ public class SeedNodeMain {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
listenForExitCommand();
|
||||
}
|
||||
|
||||
public void listenForExitCommand() {
|
||||
Scanner scan = new Scanner(System.in);
|
||||
String line;
|
||||
while (!stopped && !Thread.currentThread().isInterrupted() && ((line = scan.nextLine()) != null)) {
|
||||
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);
|
||||
}));
|
||||
}
|
||||
}
|
||||
while (true) {
|
||||
try {
|
||||
Thread.sleep(Long.MAX_VALUE);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user