mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 18:33:43 +01:00
Set v 0.5.0.0, fix issues after merge.
This commit is contained in:
parent
358f292cbe
commit
d666490424
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>core</artifactId>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -99,10 +99,22 @@ public class WalletConfig extends AbstractIdleService {
|
||||
/**
|
||||
* Creates a new WalletAppKitBitSquare, with a newly created {@link Context}. Files will be stored in the given directory.
|
||||
*/
|
||||
public WalletConfig(NetworkParameters params, Socks5Proxy socks5Proxy, File directory, String btcWalletFilePrefix, String squWalletFilePrefix) {
|
||||
this(new Context(params), directory, btcWalletFilePrefix, squWalletFilePrefix);
|
||||
public WalletConfig(NetworkParameters params, Socks5Proxy socks5Proxy,
|
||||
File directory, String btcWalletFilePrefix,
|
||||
String squWalletFilePrefix) {
|
||||
this.context = new Context(params);
|
||||
this.params = checkNotNull(context.getParams());
|
||||
this.directory = checkNotNull(directory);
|
||||
this.btcWalletFilePrefix = checkNotNull(btcWalletFilePrefix);
|
||||
this.squWalletFilePrefix = squWalletFilePrefix;
|
||||
this.socks5Proxy = socks5Proxy;
|
||||
|
||||
if (!Utils.isAndroidRuntime()) {
|
||||
InputStream stream = WalletConfig.class.getResourceAsStream("/" + params.getId() + ".checkpoints");
|
||||
if (stream != null)
|
||||
setCheckpoints(stream);
|
||||
}
|
||||
|
||||
walletFactory = new BitsquareWalletFactory() {
|
||||
@Override
|
||||
public Wallet create(NetworkParameters params, KeyChainGroup keyChainGroup) {
|
||||
@ -132,29 +144,6 @@ public class WalletConfig extends AbstractIdleService {
|
||||
Wallet create(NetworkParameters params, KeyChainGroup keyChainGroup, boolean isSquWallet);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new WalletAppKitBitSquare, with a newly created {@link Context}. Files will be stored in the given directory.
|
||||
*/
|
||||
private WalletConfig(NetworkParameters params, File directory, String btcWalletFilePrefix, String squWalletFilePrefix) {
|
||||
this(new Context(params), directory, btcWalletFilePrefix, squWalletFilePrefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new WalletAppKitBitSquare, with the given {@link Context}. Files will be stored in the given directory.
|
||||
*/
|
||||
private WalletConfig(Context context, File directory, String btcWalletFilePrefix, String squWalletFilePrefix) {
|
||||
this.context = context;
|
||||
this.params = checkNotNull(context.getParams());
|
||||
this.directory = checkNotNull(directory);
|
||||
this.btcWalletFilePrefix = checkNotNull(btcWalletFilePrefix);
|
||||
this.squWalletFilePrefix = squWalletFilePrefix;
|
||||
if (!Utils.isAndroidRuntime()) {
|
||||
InputStream stream = WalletConfig.class.getResourceAsStream("/" + params.getId() + ".checkpoints");
|
||||
if (stream != null)
|
||||
setCheckpoints(stream);
|
||||
}
|
||||
}
|
||||
|
||||
public Socks5Proxy getProxy() {
|
||||
return socks5Proxy;
|
||||
}
|
||||
|
@ -27,13 +27,16 @@ import io.bitsquare.common.Timer;
|
||||
import io.bitsquare.common.UserThread;
|
||||
import io.bitsquare.common.handlers.ExceptionHandler;
|
||||
import io.bitsquare.common.handlers.ResultHandler;
|
||||
import io.bitsquare.network.DnsLookupTor;
|
||||
import io.bitsquare.network.NetworkOptionKeys;
|
||||
import io.bitsquare.network.Socks5MultiDiscovery;
|
||||
import io.bitsquare.network.Socks5ProxyProvider;
|
||||
import io.bitsquare.storage.FileUtil;
|
||||
import io.bitsquare.storage.Storage;
|
||||
import io.bitsquare.user.Preferences;
|
||||
import javafx.beans.property.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bitcoinj.core.*;
|
||||
import org.bitcoinj.net.discovery.SeedPeers;
|
||||
import org.bitcoinj.params.MainNetParams;
|
||||
import org.bitcoinj.params.RegTestParams;
|
||||
import org.bitcoinj.params.TestNet3Params;
|
||||
@ -71,6 +74,7 @@ public class WalletsSetup {
|
||||
private final Socks5ProxyProvider socks5ProxyProvider;
|
||||
private final NetworkParameters params;
|
||||
private final File walletDir;
|
||||
private final int socks5DiscoverMode;
|
||||
private WalletConfig walletConfig;
|
||||
private Wallet btcWallet;
|
||||
private Wallet squWallet;
|
||||
@ -93,7 +97,8 @@ public class WalletsSetup {
|
||||
UserAgent userAgent,
|
||||
Preferences preferences,
|
||||
Socks5ProxyProvider socks5ProxyProvider,
|
||||
@Named(BtcOptionKeys.WALLET_DIR) File appDir) {
|
||||
@Named(BtcOptionKeys.WALLET_DIR) File appDir,
|
||||
@Named(NetworkOptionKeys.SOCKS5_DISCOVER_MODE) String socks5DiscoverModeString) {
|
||||
|
||||
this.regTestHost = regTestHost;
|
||||
this.addressEntryList = addressEntryList;
|
||||
@ -101,6 +106,27 @@ public class WalletsSetup {
|
||||
this.preferences = preferences;
|
||||
this.socks5ProxyProvider = socks5ProxyProvider;
|
||||
|
||||
String[] socks5DiscoverModes = StringUtils.deleteWhitespace(socks5DiscoverModeString).split(",");
|
||||
int mode = 0;
|
||||
for (int i = 0; i < socks5DiscoverModes.length; i++) {
|
||||
switch (socks5DiscoverModes[i]) {
|
||||
case "ADDR":
|
||||
mode |= Socks5MultiDiscovery.SOCKS5_DISCOVER_ADDR;
|
||||
break;
|
||||
case "DNS":
|
||||
mode |= Socks5MultiDiscovery.SOCKS5_DISCOVER_DNS;
|
||||
break;
|
||||
case "ONION":
|
||||
mode |= Socks5MultiDiscovery.SOCKS5_DISCOVER_ONION;
|
||||
break;
|
||||
case "ALL":
|
||||
default:
|
||||
mode |= Socks5MultiDiscovery.SOCKS5_DISCOVER_ALL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
socks5DiscoverMode = mode;
|
||||
|
||||
params = preferences.getBitcoinNetwork().getParameters();
|
||||
walletDir = new File(appDir, "bitcoin");
|
||||
|
||||
@ -247,9 +273,7 @@ public class WalletsSetup {
|
||||
// Pass custom seed nodes if set in options
|
||||
if (!btcNodes.isEmpty()) {
|
||||
|
||||
// TODO: this parsing should be more robust,
|
||||
// give validation error if needed.
|
||||
String[] nodes = btcNodes.replace(", ", ",").split(",");
|
||||
String[] nodes = StringUtils.deleteWhitespace(btcNodes).split(",");
|
||||
List<PeerAddress> peerAddressList = new ArrayList<>();
|
||||
for (String node : nodes) {
|
||||
String[] parts = node.split(":");
|
||||
@ -260,18 +284,21 @@ public class WalletsSetup {
|
||||
if (parts.length == 2) {
|
||||
// note: this will cause a DNS request if hostname used.
|
||||
// note: DNS requests are routed over socks5 proxy, if used.
|
||||
// fixme: .onion hostnames will fail! see comments in SeedPeersSocks5Dns
|
||||
// note: .onion hostnames will be unresolved.
|
||||
InetSocketAddress addr;
|
||||
if (socks5Proxy != null) {
|
||||
InetSocketAddress unresolved = InetSocketAddress.createUnresolved(parts[0], Integer.parseInt(parts[1]));
|
||||
// proxy remote DNS request happens here.
|
||||
addr = SeedPeersSocks5Dns.lookup(socks5Proxy, unresolved);
|
||||
try {
|
||||
// proxy remote DNS request happens here. blocking.
|
||||
addr = new InetSocketAddress(DnsLookupTor.lookup(socks5Proxy, parts[0]), Integer.parseInt(parts[1]));
|
||||
} catch (Exception e) {
|
||||
log.warn("Dns lookup failed for host: {}", parts[0]);
|
||||
addr = null;
|
||||
}
|
||||
} else {
|
||||
// DNS request happens here. if it fails, addr.isUnresolved() == true.
|
||||
addr = new InetSocketAddress(parts[0], Integer.parseInt(parts[1]));
|
||||
}
|
||||
// note: isUnresolved check should be removed once we fix PeerAddress
|
||||
if (addr != null && !addr.isUnresolved())
|
||||
if (addr != null && !addr.isUnresolved()) {
|
||||
peerAddressList.add(new PeerAddress(addr.getAddress(), addr.getPort()));
|
||||
}
|
||||
}
|
||||
@ -283,6 +310,7 @@ public class WalletsSetup {
|
||||
usePeerNodes = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now configure and start the appkit. This will take a second or two - we could show a temporary splash screen
|
||||
// or progress widget to keep the user engaged whilst we initialise, but we don't.
|
||||
@ -324,9 +352,8 @@ public class WalletsSetup {
|
||||
// could become outdated, so it is important that the user be able to
|
||||
// disable it, but should be made aware of the reduced privacy.
|
||||
if (socks5Proxy != null && !usePeerNodes) {
|
||||
// SeedPeersSocks5Dns should replace SeedPeers once working reliably.
|
||||
// SeedPeers uses hard coded stable addresses (from MainNetParams). It should be updated from time to time.
|
||||
walletConfig.setDiscovery(new SeedPeers(params));
|
||||
walletConfig.setDiscovery(new Socks5MultiDiscovery(socks5Proxy, params, socks5DiscoverMode));
|
||||
}
|
||||
|
||||
walletConfig.setDownloadListener(downloadListener)
|
||||
|
@ -422,6 +422,7 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload
|
||||
return pubKeyRing;
|
||||
}
|
||||
|
||||
// TODO refactor
|
||||
@Nullable
|
||||
public Fiat getPrice() {
|
||||
if (useMarketBasedPrice) {
|
||||
|
@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
package io.bitsquare.gui.main.market.spread;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import io.bitsquare.btc.pricefeed.MarketPrice;
|
||||
import io.bitsquare.btc.pricefeed.PriceFeedService;
|
||||
import io.bitsquare.btc.provider.price.MarketPrice;
|
||||
import io.bitsquare.btc.provider.price.PriceFeedService;
|
||||
import io.bitsquare.gui.common.model.ActivatableViewModel;
|
||||
import io.bitsquare.gui.main.offer.offerbook.OfferBook;
|
||||
import io.bitsquare.gui.main.offer.offerbook.OfferBookListItem;
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -6,7 +6,7 @@ mkdir -p gui/deploy
|
||||
set -e
|
||||
|
||||
# Edit version
|
||||
version=0.4.9.9
|
||||
version=0.5.0.0
|
||||
|
||||
jarFile="/media/sf_vm_shared_ubuntu14_32bit/Bitsquare-$version.jar"
|
||||
|
||||
|
@ -6,7 +6,7 @@ mkdir -p gui/deploy
|
||||
set -e
|
||||
|
||||
# Edit version
|
||||
version=0.4.9.9
|
||||
version=0.5.0.0
|
||||
|
||||
jarFile="/media/sf_vm_shared_ubuntu/Bitsquare-$version.jar"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
version="0.4.9.9"
|
||||
version="0.5.0.0"
|
||||
|
||||
target_dir="/Users/dev/Documents/__bitsquare/_releases/$version"
|
||||
src_dir="/Users/dev/Documents/intellij/bitsquare"
|
||||
|
@ -5,7 +5,7 @@
|
||||
:: 32 bit build
|
||||
:: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php)
|
||||
|
||||
SET version=0.4.9.9
|
||||
SET version=0.5.0.0
|
||||
|
||||
:: Private setup
|
||||
SET outdir=\\VBOXSVR\vm_shared_windows_32bit
|
||||
|
@ -5,7 +5,7 @@
|
||||
:: 64 bit build
|
||||
:: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php)
|
||||
|
||||
SET version=0.4.9.9
|
||||
SET version=0.5.0.0
|
||||
|
||||
:: Private setup
|
||||
SET outdir=\\VBOXSVR\vm_shared_windows
|
||||
|
@ -3,7 +3,7 @@
|
||||
[Setup]
|
||||
AppId={{bitsquare}}
|
||||
AppName=Bitsquare
|
||||
AppVersion=0.4.9.9
|
||||
AppVersion=0.5.0.0
|
||||
AppVerName=Bitsquare
|
||||
AppPublisher=Bitsquare
|
||||
AppComments=Bitsquare
|
||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>0.4.9.8</version>
|
||||
<version>0.5.0.0</version>
|
||||
<description>Bitsquare - The decentralized bitcoin exchange</description>
|
||||
<url>https://bitsquare.io</url>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package io.bitsquare.pricefeed;
|
||||
package io.bitsquare.provider;
|
||||
|
||||
import ch.qos.logback.classic.Level;
|
||||
import io.bitsquare.app.Log;
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.9.9</version>
|
||||
<version>0.5.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user