Merge remote-tracking branch 'bisq-network/hotfix/v1.6.2' into upgrade-javafax-14

This commit is contained in:
cd2357 2021-04-10 10:31:04 +02:00
commit e04537aca6
No known key found for this signature in database
GPG Key ID: F26C56748514D0D3
20 changed files with 54 additions and 23 deletions

View File

@ -389,7 +389,7 @@ configure(project(':desktop')) {
apply from: '../gradle/witness/gradle-witness.gradle'
apply from: 'package/package.gradle'
version = '1.6.1-SNAPSHOT'
version = '1.6.2-SNAPSHOT'
jar.manifest.attributes(
"Implementation-Title": project.name,

View File

@ -30,7 +30,7 @@ public class Version {
// VERSION = 0.5.0 introduces proto buffer for the P2P network and local DB and is a not backward compatible update
// Therefore all sub versions start again with 1
// We use semantic versioning with major, minor and patch
public static final String VERSION = "1.6.1";
public static final String VERSION = "1.6.2";
/**
* Holds a list of the tagged resource files for optimizing the getData requests.

View File

@ -103,6 +103,7 @@ import javax.annotation.Nullable;
@Singleton
public class BisqSetup {
private static final String VERSION_FILE_NAME = "version";
private static final String RESYNC_SPV_FILE_NAME = "resyncSpv";
public interface BisqSetupListener {
default void onInitP2pNetwork() {
@ -325,7 +326,7 @@ public class BisqSetup {
private void maybeReSyncSPVChain() {
// We do the delete of the spv file at startup before BitcoinJ is initialized to avoid issues with locked files under Windows.
if (preferences.isResyncSpvRequested()) {
if (getResyncSpvSemaphore()) {
try {
walletsSetup.reSyncSPVChain();
@ -424,7 +425,7 @@ public class BisqSetup {
walletsManager.setAesKey(aesKey);
walletsSetup.getWalletConfig().maybeAddSegwitKeychain(walletsSetup.getWalletConfig().btcWallet(),
aesKey);
if (preferences.isResyncSpvRequested()) {
if (getResyncSpvSemaphore()) {
if (showFirstPopupIfResyncSPVRequestedHandler != null)
showFirstPopupIfResyncSPVRequestedHandler.run();
} else {
@ -438,6 +439,7 @@ public class BisqSetup {
};
walletAppSetup.init(chainFileLockedExceptionHandler,
spvFileCorruptedHandler,
getResyncSpvSemaphore(),
showFirstPopupIfResyncSPVRequestedHandler,
showPopupIfInvalidBtcConfigHandler,
walletPasswordHandler,
@ -542,6 +544,33 @@ public class BisqSetup {
return null;
}
@Nullable
public static boolean getResyncSpvSemaphore() {
File resyncSpvSemaphore = new File(Config.appDataDir(), RESYNC_SPV_FILE_NAME);
return resyncSpvSemaphore.exists();
}
public static void setResyncSpvSemaphore(boolean isResyncSpvRequested) {
File resyncSpvSemaphore = new File(Config.appDataDir(), RESYNC_SPV_FILE_NAME);
if (isResyncSpvRequested) {
if (!resyncSpvSemaphore.exists()) {
try {
if (!resyncSpvSemaphore.createNewFile()) {
log.error("ResyncSpv file could not be created");
}
} catch (IOException e) {
e.printStackTrace();
log.error("ResyncSpv file could not be created. {}", e.toString());
}
}
} else {
resyncSpvSemaphore.delete();
}
}
private static File getVersionFile() {
return new File(Config.appDataDir(), VERSION_FILE_NAME);
}

View File

@ -105,6 +105,7 @@ public class WalletAppSetup {
void init(@Nullable Consumer<String> chainFileLockedExceptionHandler,
@Nullable Consumer<String> spvFileCorruptedHandler,
boolean isSpvResyncRequested,
@Nullable Runnable showFirstPopupIfResyncSPVRequestedHandler,
@Nullable Runnable showPopupIfInvalidBtcConfigHandler,
Runnable walletPasswordHandler,
@ -179,7 +180,7 @@ public class WalletAppSetup {
if (walletsManager.areWalletsEncrypted() && !coreContext.isApiUser()) {
walletPasswordHandler.run();
} else {
if (preferences.isResyncSpvRequested() && !coreContext.isApiUser()) {
if (isSpvResyncRequested && !coreContext.isApiUser()) {
if (showFirstPopupIfResyncSPVRequestedHandler != null)
showFirstPopupIfResyncSPVRequestedHandler.run();
} else {

View File

@ -111,7 +111,7 @@ public class TriggerPriceService {
public static boolean wasTriggered(MarketPrice marketPrice, OpenOffer openOffer) {
Price price = openOffer.getOffer().getPrice();
if (price == null) {
if (price == null || marketPrice == null) {
return false;
}

View File

@ -8,7 +8,7 @@
# pull base image
FROM openjdk:8-jdk
ENV version 1.6.1-SNAPSHOT
ENV version 1.6.2-SNAPSHOT
RUN apt-get update && apt-get install -y --no-install-recommends openjfx && rm -rf /var/lib/apt/lists/* &&
apt-get install -y vim fakeroot

View File

@ -6,7 +6,7 @@
# - Update version below
# - Ensure JAVA_HOME below is pointing to OracleJDK 10 directory
version=1.6.1-SNAPSHOT
version=1.6.2-SNAPSHOT
version_base=$(echo $version | awk -F'[_-]' '{print $1}')
if [ ! -f "$JAVA_HOME/bin/javapackager" ]; then
if [ -d "/usr/lib/jvm/jdk-10.0.2" ]; then

View File

@ -4,7 +4,7 @@
# Prior to running this script:
# - Update version below
version=1.6.1-SNAPSHOT
version=1.6.2-SNAPSHOT
base_dir=$( cd "$(dirname "$0")" ; pwd -P )/../../..
package_dir=$base_dir/desktop/package
release_dir=$base_dir/desktop/release/$version

View File

@ -5,10 +5,10 @@
<!-- See: https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -->
<key>CFBundleVersion</key>
<string>1.6.1</string>
<string>1.6.2</string>
<key>CFBundleShortVersionString</key>
<string>1.6.1</string>
<string>1.6.2</string>
<key>CFBundleExecutable</key>
<string>Bisq</string>

View File

@ -2,7 +2,7 @@
cd $(dirname $0)/../../../
version="1.6.1"
version="1.6.2"
# Set BISQ_DIR as environment var to the path of your locally synced Bisq data directory e.g. BISQ_DIR=~/Library/Application\ Support/Bisq

View File

@ -6,7 +6,7 @@ mkdir -p deploy
set -e
version="1.6.1-SNAPSHOT"
version="1.6.2-SNAPSHOT"
cd ..
./gradlew :desktop:build -x test shadowJar

View File

@ -2,7 +2,7 @@
cd ../../
version="1.6.1-SNAPSHOT"
version="1.6.2-SNAPSHOT"
target_dir="releases/$version"

View File

@ -2,7 +2,7 @@
cd $(dirname $0)/../../../
version=1.6.1
version=1.6.2
find . -type f \( -name "finalize.sh" \
-o -name "create_app.sh" \

View File

@ -2,8 +2,8 @@
cd $(dirname $0)/../../../.
oldVersion=1.6.0
newVersion=1.6.1
oldVersion=1.6.1
newVersion=1.6.2
find . -type f \( -name "finalize.sh" \
-o -name "create_app.sh" \

View File

@ -11,7 +11,7 @@
@echo off
set version=1.6.1-SNAPSHOT
set version=1.6.2-SNAPSHOT
if not exist "%JAVA_HOME%\bin\javapackager.exe" (
if not exist "%ProgramFiles%\Java\jdk-10.0.2" (
echo Javapackager not found. Update JAVA_HOME variable to point to OracleJDK.

View File

@ -6,7 +6,7 @@
@echo off
set version=1.6.1-SNAPSHOT
set version=1.6.2-SNAPSHOT
set release_dir=%~dp0..\..\..\releases\%version%
set package_dir=%~dp0..

View File

@ -575,7 +575,7 @@ public class MainViewModel implements ViewModel, BisqSetup.BisqSetupListener {
private void showSecondPopupIfResyncSPVRequested(Popup firstPopup) {
firstPopup.hide();
preferences.setResyncSpvRequested(false);
BisqSetup.setResyncSpvSemaphore(false);
new Popup().information(Res.get("settings.net.reSyncSPVAfterRestartCompleted"))
.hideCloseButton()
.useShutDownButton()

View File

@ -30,6 +30,7 @@ import bisq.desktop.main.overlays.popups.Popup;
import bisq.core.account.witness.AccountAgeWitness;
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.app.BisqSetup;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.locale.Country;
import bisq.core.locale.CountryUtil;
@ -823,7 +824,7 @@ public class GUIUtil {
.useShutDownButton()
.actionButtonText(Res.get("shared.shutDown"))
.onAction(() -> {
preferences.setResyncSpvRequested(true);
BisqSetup.setResyncSpvSemaphore(true);
UserThread.runAfter(BisqApp.getShutDownHandler(), 100, TimeUnit.MILLISECONDS);
})
.closeButtonText(Res.get("shared.cancel"))

View File

@ -1 +1 @@
1.6.1-SNAPSHOT
1.6.2-SNAPSHOT

View File

@ -47,7 +47,7 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
public class SeedNodeMain extends ExecutableForAppWithP2p {
private static final long CHECK_CONNECTION_LOSS_SEC = 30;
private static final String VERSION = "1.6.1";
private static final String VERSION = "1.6.2";
private SeedNode seedNode;
private Timer checkConnectionLossTime;