mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-25 07:27:18 +01:00
Merge branch 'UI-improvements' into feature/show-tooltip-if-truncated
# Conflicts: # gui/src/main/java/io/bisq/gui/components/HyperlinkWithIcon.java # gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java
This commit is contained in:
commit
f3b638078b
83 changed files with 792 additions and 812 deletions
|
@ -17,14 +17,12 @@
|
||||||
|
|
||||||
package io.bisq.common.app;
|
package io.bisq.common.app;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkArgument;
|
import static com.google.common.base.Preconditions.checkArgument;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
public class Version {
|
public class Version {
|
||||||
private static final Logger log = LoggerFactory.getLogger(Version.class);
|
|
||||||
|
|
||||||
// The application versions
|
// The application versions
|
||||||
// VERSION = 0.5.0 introduces proto buffer for the P2P network and local DB and is a not backward compatible update
|
// 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
|
// Therefore all sub versions start again with 1
|
||||||
|
|
|
@ -230,10 +230,10 @@ mainView.footer.btcInfo.connectingTo=connecting to
|
||||||
mainView.footer.btcInfo.connectionFailed=connection failed
|
mainView.footer.btcInfo.connectionFailed=connection failed
|
||||||
mainView.footer.p2pInfo= P2P network peers: {0}
|
mainView.footer.p2pInfo= P2P network peers: {0}
|
||||||
|
|
||||||
mainView.bootstrapState.connectionToTorNetwork=Connecting to Tor network...
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) Connecting to Tor network...
|
||||||
mainView.bootstrapState.torNodeCreated=Tor node created
|
mainView.bootstrapState.torNodeCreated=(2/4) Tor node created
|
||||||
mainView.bootstrapState.hiddenServicePublished=Hidden Service published
|
mainView.bootstrapState.hiddenServicePublished=(3/4) Hidden Service published
|
||||||
mainView.bootstrapState.initialDataReceived=Initial data received
|
mainView.bootstrapState.initialDataReceived=(4/4) Initial data received
|
||||||
|
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=No seed nodes available
|
mainView.bootstrapWarning.noSeedNodesAvailable=No seed nodes available
|
||||||
mainView.bootstrapWarning.noNodesAvailable=No seed nodes and peers available
|
mainView.bootstrapWarning.noNodesAvailable=No seed nodes and peers available
|
||||||
|
|
|
@ -226,10 +226,10 @@ mainView.footer.btcInfo.connectingTo=verbinde mit
|
||||||
mainView.footer.btcInfo.connectionFailed=Verbindung fehlgeschlagen
|
mainView.footer.btcInfo.connectionFailed=Verbindung fehlgeschlagen
|
||||||
mainView.footer.p2pInfo= P2P-Netzwerk-Peers: {0}
|
mainView.footer.p2pInfo= P2P-Netzwerk-Peers: {0}
|
||||||
|
|
||||||
mainView.bootstrapState.connectionToTorNetwork=Verbindung mit Tor-Netzwerk wird hergestellt...
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) Verbindung mit Tor-Netzwerk wird hergestellt...
|
||||||
mainView.bootstrapState.torNodeCreated=Tor-Knoten erstellt
|
mainView.bootstrapState.torNodeCreated=(2/4) Tor-Knoten erstellt
|
||||||
mainView.bootstrapState.hiddenServicePublished=Hidden Service veröffentlicht
|
mainView.bootstrapState.hiddenServicePublished=(3/4) Hidden Service veröffentlicht
|
||||||
mainView.bootstrapState.initialDataReceived=Anfangsdaten erhalten
|
mainView.bootstrapState.initialDataReceived=(4/4) Anfangsdaten erhalten
|
||||||
|
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=Keine Seed-Knoten verfügbar
|
mainView.bootstrapWarning.noSeedNodesAvailable=Keine Seed-Knoten verfügbar
|
||||||
mainView.bootstrapWarning.noNodesAvailable=Keine Seed-Knoten und Peers verfügbar
|
mainView.bootstrapWarning.noNodesAvailable=Keine Seed-Knoten und Peers verfügbar
|
||||||
|
|
|
@ -226,10 +226,10 @@ mainView.footer.btcInfo.connectingTo=σύνδεση με
|
||||||
mainView.footer.btcInfo.connectionFailed=σύνδεση απέτυχε
|
mainView.footer.btcInfo.connectionFailed=σύνδεση απέτυχε
|
||||||
mainView.footer.p2pInfo= P2P network peers: {0}
|
mainView.footer.p2pInfo= P2P network peers: {0}
|
||||||
|
|
||||||
mainView.bootstrapState.connectionToTorNetwork=Σύνδεση με δίκτυο Tor...
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) Σύνδεση με δίκτυο Tor...
|
||||||
mainView.bootstrapState.torNodeCreated=Κόμβος Tor δημιουργήθηκε
|
mainView.bootstrapState.torNodeCreated=(2/4) Κόμβος Tor δημιουργήθηκε
|
||||||
mainView.bootstrapState.hiddenServicePublished=Κοινοποίηση κρυφής υπηρεσίας
|
mainView.bootstrapState.hiddenServicePublished=(3/4) Κοινοποίηση κρυφής υπηρεσίας
|
||||||
mainView.bootstrapState.initialDataReceived=Αρχικά δεδομένα ελήφθησαν
|
mainView.bootstrapState.initialDataReceived=(4/4) Αρχικά δεδομένα ελήφθησαν
|
||||||
|
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=Δεν υπάρχουν διαθέσιμοι seed κόμβοι
|
mainView.bootstrapWarning.noSeedNodesAvailable=Δεν υπάρχουν διαθέσιμοι seed κόμβοι
|
||||||
mainView.bootstrapWarning.noNodesAvailable=Δεν υπάρχουν διαθέσιμοι seed κόμβοι και peers
|
mainView.bootstrapWarning.noNodesAvailable=Δεν υπάρχουν διαθέσιμοι seed κόμβοι και peers
|
||||||
|
|
|
@ -226,10 +226,10 @@ mainView.footer.btcInfo.connectingTo=Conectando a
|
||||||
mainView.footer.btcInfo.connectionFailed=Conexión fallida
|
mainView.footer.btcInfo.connectionFailed=Conexión fallida
|
||||||
mainView.footer.p2pInfo= Pares de red P2P: {0}
|
mainView.footer.p2pInfo= Pares de red P2P: {0}
|
||||||
|
|
||||||
mainView.bootstrapState.connectionToTorNetwork=Conectando a la red Tor...
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) Conectando a la red Tor...
|
||||||
mainView.bootstrapState.torNodeCreated=Nodo Tor creado
|
mainView.bootstrapState.torNodeCreated=(2/4) Nodo Tor creado
|
||||||
mainView.bootstrapState.hiddenServicePublished=Servicio Escondido publicado
|
mainView.bootstrapState.hiddenServicePublished=(3/4) Servicio Escondido publicado
|
||||||
mainView.bootstrapState.initialDataReceived=Datos iniciales recibidos.
|
mainView.bootstrapState.initialDataReceived=(4/4) Datos iniciales recibidos.
|
||||||
|
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=No hay nodos de siembra disponibles
|
mainView.bootstrapWarning.noSeedNodesAvailable=No hay nodos de siembra disponibles
|
||||||
mainView.bootstrapWarning.noNodesAvailable=No hay nodos de sembrado y pares disponibles
|
mainView.bootstrapWarning.noNodesAvailable=No hay nodos de sembrado y pares disponibles
|
||||||
|
|
|
@ -226,10 +226,10 @@ mainView.footer.btcInfo.connectingTo=csatlakozás
|
||||||
mainView.footer.btcInfo.connectionFailed=sikeretlen kapcsolat
|
mainView.footer.btcInfo.connectionFailed=sikeretlen kapcsolat
|
||||||
mainView.footer.p2pInfo= P2P hálózat társak: {0}
|
mainView.footer.p2pInfo= P2P hálózat társak: {0}
|
||||||
|
|
||||||
mainView.bootstrapState.connectionToTorNetwork=Csatlakozás Tor hálózathoz...
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) Csatlakozás Tor hálózathoz...
|
||||||
mainView.bootstrapState.torNodeCreated=Tor csomópont létrehozva
|
mainView.bootstrapState.torNodeCreated=(2/4) Tor csomópont létrehozva
|
||||||
mainView.bootstrapState.hiddenServicePublished=Rejtett Szolgáltatás megjelentve
|
mainView.bootstrapState.hiddenServicePublished=(3/4) Rejtett Szolgáltatás megjelentve
|
||||||
mainView.bootstrapState.initialDataReceived=Kezdeti adatok megérkezve
|
mainView.bootstrapState.initialDataReceived=(4/4) Kezdeti adatok megérkezve
|
||||||
|
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=Nincs elérhető mag csomópont
|
mainView.bootstrapWarning.noSeedNodesAvailable=Nincs elérhető mag csomópont
|
||||||
mainView.bootstrapWarning.noNodesAvailable=Nincs elérhető mag és társ csomópont
|
mainView.bootstrapWarning.noNodesAvailable=Nincs elérhető mag és társ csomópont
|
||||||
|
|
|
@ -226,10 +226,10 @@ mainView.footer.btcInfo.connectingTo=conectando à
|
||||||
mainView.footer.btcInfo.connectionFailed=falha na conexão
|
mainView.footer.btcInfo.connectionFailed=falha na conexão
|
||||||
mainView.footer.p2pInfo= Pares na rede P2P: {0}
|
mainView.footer.p2pInfo= Pares na rede P2P: {0}
|
||||||
|
|
||||||
mainView.bootstrapState.connectionToTorNetwork=Conectando à rede Tor....
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) Conectando à rede Tor....
|
||||||
mainView.bootstrapState.torNodeCreated=Nó da rede Tor criado
|
mainView.bootstrapState.torNodeCreated=(2/4) Nó da rede Tor criado
|
||||||
mainView.bootstrapState.hiddenServicePublished=Serviço Oculto publicado
|
mainView.bootstrapState.hiddenServicePublished=(3/4) Serviço Oculto publicado
|
||||||
mainView.bootstrapState.initialDataReceived=Dados iniciais recebidos
|
mainView.bootstrapState.initialDataReceived=(4/4) Dados iniciais recebidos
|
||||||
|
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=Nenhum nó semente disponível
|
mainView.bootstrapWarning.noSeedNodesAvailable=Nenhum nó semente disponível
|
||||||
mainView.bootstrapWarning.noNodesAvailable=Sem nós semente e pares disponíveis
|
mainView.bootstrapWarning.noNodesAvailable=Sem nós semente e pares disponíveis
|
||||||
|
|
|
@ -226,10 +226,10 @@ mainView.footer.btcInfo.connectingTo=conectare la
|
||||||
mainView.footer.btcInfo.connectionFailed=conectare eșuată
|
mainView.footer.btcInfo.connectionFailed=conectare eșuată
|
||||||
mainView.footer.p2pInfo= Semeni de rețea P2P: {0}
|
mainView.footer.p2pInfo= Semeni de rețea P2P: {0}
|
||||||
|
|
||||||
mainView.bootstrapState.connectionToTorNetwork=Conectare la rețeaua Tor...
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) Conectare la rețeaua Tor...
|
||||||
mainView.bootstrapState.torNodeCreated=Nod Tor creat
|
mainView.bootstrapState.torNodeCreated=(2/4) Nod Tor creat
|
||||||
mainView.bootstrapState.hiddenServicePublished=Serviciu ascuns publicat
|
mainView.bootstrapState.hiddenServicePublished=(3/4) Serviciu ascuns publicat
|
||||||
mainView.bootstrapState.initialDataReceived=Date inițiale primite
|
mainView.bootstrapState.initialDataReceived=(4/4) Date inițiale primite
|
||||||
|
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=Nu există noduri nucleu disponibile
|
mainView.bootstrapWarning.noSeedNodesAvailable=Nu există noduri nucleu disponibile
|
||||||
mainView.bootstrapWarning.noNodesAvailable=Nu există semeni și noduri nucleu disponibile
|
mainView.bootstrapWarning.noNodesAvailable=Nu există semeni și noduri nucleu disponibile
|
||||||
|
|
|
@ -226,10 +226,10 @@ mainView.footer.btcInfo.connectingTo=соединение с
|
||||||
mainView.footer.btcInfo.connectionFailed=соединение неудачно
|
mainView.footer.btcInfo.connectionFailed=соединение неудачно
|
||||||
mainView.footer.p2pInfo= Участников P2P сети: {0}
|
mainView.footer.p2pInfo= Участников P2P сети: {0}
|
||||||
|
|
||||||
mainView.bootstrapState.connectionToTorNetwork=Соединение с сетью Tor...
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) Соединение с сетью Tor...
|
||||||
mainView.bootstrapState.torNodeCreated=Создан узел Tor
|
mainView.bootstrapState.torNodeCreated=(2/4) Создан узел Tor
|
||||||
mainView.bootstrapState.hiddenServicePublished=Скрытая служба опубликовала
|
mainView.bootstrapState.hiddenServicePublished=(3/4) Скрытая служба опубликовала
|
||||||
mainView.bootstrapState.initialDataReceived=Начальные данные получены
|
mainView.bootstrapState.initialDataReceived=(4/4) Начальные данные получены
|
||||||
|
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=Нет доступных узлов.
|
mainView.bootstrapWarning.noSeedNodesAvailable=Нет доступных узлов.
|
||||||
mainView.bootstrapWarning.noNodesAvailable=Нет доступных узлов и участников
|
mainView.bootstrapWarning.noNodesAvailable=Нет доступных узлов и участников
|
||||||
|
|
|
@ -226,10 +226,10 @@ mainView.footer.btcInfo.connectingTo=povezivanje sa
|
||||||
mainView.footer.btcInfo.connectionFailed=veza nije uspostavljena
|
mainView.footer.btcInfo.connectionFailed=veza nije uspostavljena
|
||||||
mainView.footer.p2pInfo= Pirovi P2P mreže: {0}
|
mainView.footer.p2pInfo= Pirovi P2P mreže: {0}
|
||||||
|
|
||||||
mainView.bootstrapState.connectionToTorNetwork=Povezivanje sa Tor mrežom...
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) Povezivanje sa Tor mrežom...
|
||||||
mainView.bootstrapState.torNodeCreated=Tor noda napravljena
|
mainView.bootstrapState.torNodeCreated=(2/4) Tor noda napravljena
|
||||||
mainView.bootstrapState.hiddenServicePublished=Skriven Servis objavljen
|
mainView.bootstrapState.hiddenServicePublished=(3/4) Skriven Servis objavljen
|
||||||
mainView.bootstrapState.initialDataReceived=Inicijalni podaci primljeni
|
mainView.bootstrapState.initialDataReceived=(4/4) Inicijalni podaci primljeni
|
||||||
|
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=Sid node nisu dostupne
|
mainView.bootstrapWarning.noSeedNodesAvailable=Sid node nisu dostupne
|
||||||
mainView.bootstrapWarning.noNodesAvailable=Sid node i pirovi nisu dostupni
|
mainView.bootstrapWarning.noNodesAvailable=Sid node i pirovi nisu dostupni
|
||||||
|
|
|
@ -226,10 +226,10 @@ mainView.footer.btcInfo.connectingTo=连接至
|
||||||
mainView.footer.btcInfo.connectionFailed=连接失败
|
mainView.footer.btcInfo.connectionFailed=连接失败
|
||||||
mainView.footer.p2pInfo= P2P 网络节点: {0}
|
mainView.footer.p2pInfo= P2P 网络节点: {0}
|
||||||
|
|
||||||
mainView.bootstrapState.connectionToTorNetwork=连接至 Tor 网络...
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) 连接至 Tor 网络...
|
||||||
mainView.bootstrapState.torNodeCreated=Tor 节点已创建
|
mainView.bootstrapState.torNodeCreated=(2/4) Tor 节点已创建
|
||||||
mainView.bootstrapState.hiddenServicePublished=隐藏的服务已发布
|
mainView.bootstrapState.hiddenServicePublished=(3/4) 隐藏的服务已发布
|
||||||
mainView.bootstrapState.initialDataReceived=初始数据已接收
|
mainView.bootstrapState.initialDataReceived=(4/4) 初始数据已接收
|
||||||
|
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=没有可用的种子节点
|
mainView.bootstrapWarning.noSeedNodesAvailable=没有可用的种子节点
|
||||||
mainView.bootstrapWarning.noNodesAvailable=没有可用的种子节点和节点
|
mainView.bootstrapWarning.noNodesAvailable=没有可用的种子节点和节点
|
||||||
|
|
|
@ -414,10 +414,10 @@ mainView.footer.btcInfo.synchronizedWith=Synchronisé avec
|
||||||
mainView.footer.btcInfo.connectingTo=Connexion à
|
mainView.footer.btcInfo.connectingTo=Connexion à
|
||||||
mainView.footer.btcInfo.connectionFailed=Échec de la connexion
|
mainView.footer.btcInfo.connectionFailed=Échec de la connexion
|
||||||
mainView.footer.p2pInfo=Pairs de réseau P2P: {0}
|
mainView.footer.p2pInfo=Pairs de réseau P2P: {0}
|
||||||
mainView.bootstrapState.connectionToTorNetwork=Connexion au réseau Tor...
|
mainView.bootstrapState.connectionToTorNetwork=(1/4) Connexion au réseau Tor...
|
||||||
mainView.bootstrapState.torNodeCreated=Noeud Tor créé
|
mainView.bootstrapState.torNodeCreated=(2/4) Noeud Tor créé
|
||||||
mainView.bootstrapState.hiddenServicePublished=Service caché publié
|
mainView.bootstrapState.hiddenServicePublished=(3/4) Service caché publié
|
||||||
mainView.bootstrapState.initialDataReceived=Données initiales reçues
|
mainView.bootstrapState.initialDataReceived=(4/4) Données initiales reçues
|
||||||
mainView.bootstrapWarning.noSeedNodesAvailable=Aucun nœud d'initialisation disponible
|
mainView.bootstrapWarning.noSeedNodesAvailable=Aucun nœud d'initialisation disponible
|
||||||
mainView.bootstrapWarning.noNodesAvailable=Aucun nœud d'initialisation ou de pair persistant n'est disponible
|
mainView.bootstrapWarning.noNodesAvailable=Aucun nœud d'initialisation ou de pair persistant n'est disponible
|
||||||
mainView.bootstrapWarning.bootstrappingToP2PFailed=Le démarrage du réseau P2P a échoué
|
mainView.bootstrapWarning.bootstrappingToP2PFailed=Le démarrage du réseau P2P a échoué
|
||||||
|
|
|
@ -272,10 +272,10 @@ public class BisqEnvironment extends StandardEnvironment {
|
||||||
"Bisq";
|
"Bisq";
|
||||||
useAllProvidedNodes = commandLineProperties.containsProperty(BtcOptionKeys.USE_ALL_PROVIDED_NODES) ?
|
useAllProvidedNodes = commandLineProperties.containsProperty(BtcOptionKeys.USE_ALL_PROVIDED_NODES) ?
|
||||||
(String) commandLineProperties.getProperty(BtcOptionKeys.USE_ALL_PROVIDED_NODES) :
|
(String) commandLineProperties.getProperty(BtcOptionKeys.USE_ALL_PROVIDED_NODES) :
|
||||||
"";
|
"false";
|
||||||
numConnectionForBtc = commandLineProperties.containsProperty(BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC) ?
|
numConnectionForBtc = commandLineProperties.containsProperty(BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC) ?
|
||||||
(String) commandLineProperties.getProperty(BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC) :
|
(String) commandLineProperties.getProperty(BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC) :
|
||||||
"8";
|
"9";
|
||||||
|
|
||||||
MutablePropertySources propertySources = this.getPropertySources();
|
MutablePropertySources propertySources = this.getPropertySources();
|
||||||
propertySources.addFirst(commandLineProperties);
|
propertySources.addFirst(commandLineProperties);
|
||||||
|
|
|
@ -160,7 +160,7 @@ public abstract class BisqExecutable {
|
||||||
description("User agent at btc node connections", ""))
|
description("User agent at btc node connections", ""))
|
||||||
.withRequiredArg();
|
.withRequiredArg();
|
||||||
parser.accepts(BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC,
|
parser.accepts(BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC,
|
||||||
description("Number of connections to the Bitcoin network", "8"))
|
description("Number of connections to the Bitcoin network", "9"))
|
||||||
.withRequiredArg();
|
.withRequiredArg();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ import static com.google.common.base.Preconditions.*;
|
||||||
// Does the basic wiring
|
// Does the basic wiring
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class WalletConfig extends AbstractIdleService {
|
public class WalletConfig extends AbstractIdleService {
|
||||||
|
private static int TIMEOUT = 120 * 1000; // connectTimeoutMillis. 60 sec used in bitcoinj, but for Tor we allow more.
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// WalletFactory
|
// WalletFactory
|
||||||
|
@ -190,7 +191,6 @@ public class WalletConfig extends AbstractIdleService {
|
||||||
new InetSocketAddress(socks5Proxy.getInetAddress().getHostName(),
|
new InetSocketAddress(socks5Proxy.getInetAddress().getHostName(),
|
||||||
socks5Proxy.getPort()));
|
socks5Proxy.getPort()));
|
||||||
|
|
||||||
int TIMEOUT = 120 * 1000; // 60 used in bitcoinj, but for Tor we allow more.
|
|
||||||
ProxySocketFactory proxySocketFactory = new ProxySocketFactory(proxy);
|
ProxySocketFactory proxySocketFactory = new ProxySocketFactory(proxy);
|
||||||
// we dont use tor mode if we have a local node running
|
// we dont use tor mode if we have a local node running
|
||||||
BlockingClientManager blockingClientManager = bisqEnvironment.isBitcoinLocalhostNodeRunning() ?
|
BlockingClientManager blockingClientManager = bisqEnvironment.isBitcoinLocalhostNodeRunning() ?
|
||||||
|
|
|
@ -71,8 +71,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
// merge WalletsSetup with WalletConfig to one class.
|
// merge WalletsSetup with WalletConfig to one class.
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class WalletsSetup {
|
public class WalletsSetup {
|
||||||
// We reduce defaultConnections from 12 (PeerGroup.DEFAULT_CONNECTIONS) to 8 nodes
|
// We reduce defaultConnections from 12 (PeerGroup.DEFAULT_CONNECTIONS) to 9 nodes
|
||||||
private static final int DEFAULT_CONNECTIONS = 8;
|
private static final int DEFAULT_CONNECTIONS = 9;
|
||||||
|
|
||||||
private static final long STARTUP_TIMEOUT = 180;
|
private static final long STARTUP_TIMEOUT = 180;
|
||||||
private final String btcWalletFileName;
|
private final String btcWalletFileName;
|
||||||
|
|
|
@ -13,16 +13,13 @@ import io.bisq.core.dao.blockchain.vo.BsqBlock;
|
||||||
import io.bisq.network.p2p.network.CloseConnectionReason;
|
import io.bisq.network.p2p.network.CloseConnectionReason;
|
||||||
import io.bisq.network.p2p.network.Connection;
|
import io.bisq.network.p2p.network.Connection;
|
||||||
import io.bisq.network.p2p.network.NetworkNode;
|
import io.bisq.network.p2p.network.NetworkNode;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
@Slf4j
|
||||||
public class GetBlocksRequestHandler {
|
public class GetBlocksRequestHandler {
|
||||||
private static final Logger log = LoggerFactory.getLogger(GetBlocksRequestHandler.class);
|
|
||||||
|
|
||||||
private static final long TIMEOUT = 120;
|
private static final long TIMEOUT = 120;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ import static com.google.common.base.Preconditions.checkArgument;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class RequestBlocksHandler implements MessageListener {
|
public class RequestBlocksHandler implements MessageListener {
|
||||||
|
|
||||||
private static final long TIMEOUT = 120;
|
private static final long TIMEOUT = 120;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,6 @@ public class CoreSeedNodesRepository implements SeedNodesRepository {
|
||||||
new NodeAddress("rm7b56wbrcczpjvl.onion:8000"), // @manfredkarrer
|
new NodeAddress("rm7b56wbrcczpjvl.onion:8000"), // @manfredkarrer
|
||||||
new NodeAddress("fl3mmribyxgrv63c.onion:8000"), // @manfredkarrer
|
new NodeAddress("fl3mmribyxgrv63c.onion:8000"), // @manfredkarrer
|
||||||
|
|
||||||
//TODO dev
|
|
||||||
// local dev
|
// local dev
|
||||||
// new NodeAddress("joehwtpe7ijnz4df.onion:8000"),
|
// new NodeAddress("joehwtpe7ijnz4df.onion:8000"),
|
||||||
// new NodeAddress("uqxi3zrpobhtoes6.onion:8000"),
|
// new NodeAddress("uqxi3zrpobhtoes6.onion:8000"),
|
||||||
|
|
|
@ -68,9 +68,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||||
|
|
||||||
private static final long RETRY_REPUBLISH_DELAY_SEC = 10;
|
private static final long RETRY_REPUBLISH_DELAY_SEC = 10;
|
||||||
private static final long REPUBLISH_AGAIN_AT_STARTUP_DELAY_SEC = 30;
|
private static final long REPUBLISH_AGAIN_AT_STARTUP_DELAY_SEC = 30;
|
||||||
@SuppressWarnings("ConstantConditions")
|
|
||||||
private static final long REPUBLISH_INTERVAL_MS = TimeUnit.MINUTES.toMillis(30);
|
private static final long REPUBLISH_INTERVAL_MS = TimeUnit.MINUTES.toMillis(30);
|
||||||
@SuppressWarnings("ConstantConditions")
|
|
||||||
private static final long REFRESH_INTERVAL_MS = TimeUnit.MINUTES.toMillis(5);
|
private static final long REFRESH_INTERVAL_MS = TimeUnit.MINUTES.toMillis(5);
|
||||||
|
|
||||||
private final KeyRing keyRing;
|
private final KeyRing keyRing;
|
||||||
|
|
|
@ -30,13 +30,10 @@ import io.bisq.core.offer.messages.OfferAvailabilityResponse;
|
||||||
import io.bisq.core.offer.messages.OfferMessage;
|
import io.bisq.core.offer.messages.OfferMessage;
|
||||||
import io.bisq.core.util.Validator;
|
import io.bisq.core.util.Validator;
|
||||||
import io.bisq.network.p2p.DecryptedDirectMessageListener;
|
import io.bisq.network.p2p.DecryptedDirectMessageListener;
|
||||||
import org.slf4j.Logger;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.slf4j.LoggerFactory;
|
@Slf4j
|
||||||
|
|
||||||
public class OfferAvailabilityProtocol {
|
public class OfferAvailabilityProtocol {
|
||||||
private static final Logger log = LoggerFactory.getLogger(OfferAvailabilityProtocol.class);
|
private static final long TIMEOUT = 90;
|
||||||
|
|
||||||
private static final long TIMEOUT = 120;
|
|
||||||
|
|
||||||
private final OfferAvailabilityModel model;
|
private final OfferAvailabilityModel model;
|
||||||
private final ResultHandler resultHandler;
|
private final ResultHandler resultHandler;
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class ProvidersRepository {
|
||||||
"http://ceaanhbvluug4we6.onion/, " +// @miker
|
"http://ceaanhbvluug4we6.onion/, " +// @miker
|
||||||
"http://44mgyoe2b6oqiytt.onion/, " +// @manfredkarrer
|
"http://44mgyoe2b6oqiytt.onion/, " +// @manfredkarrer
|
||||||
"http://5bmpx76qllutpcyp.onion/, " +// @manfredkarrer
|
"http://5bmpx76qllutpcyp.onion/, " +// @manfredkarrer
|
||||||
"http://rb2l2qale2pqzjyo.onion/"; // @sqrrm
|
"http://rb2l2qale2pqzjyo.onion/"; // @manfredkarrer
|
||||||
|
|
||||||
private final String providersFromProgramArgs;
|
private final String providersFromProgramArgs;
|
||||||
private final boolean useLocalhostForP2P;
|
private final boolean useLocalhostForP2P;
|
||||||
|
|
|
@ -31,7 +31,6 @@ import io.bisq.gui.main.offer.offerbook.OfferBook;
|
||||||
import io.bisq.gui.util.BSFormatter;
|
import io.bisq.gui.util.BSFormatter;
|
||||||
import io.bisq.gui.util.BsqFormatter;
|
import io.bisq.gui.util.BsqFormatter;
|
||||||
import io.bisq.gui.util.Transitions;
|
import io.bisq.gui.util.Transitions;
|
||||||
import io.bisq.gui.util.validation.*;
|
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
||||||
|
|
||||||
|
@ -61,13 +60,6 @@ public class GuiModule extends AppModule {
|
||||||
bind(BSFormatter.class).in(Singleton.class);
|
bind(BSFormatter.class).in(Singleton.class);
|
||||||
bind(BsqFormatter.class).in(Singleton.class);
|
bind(BsqFormatter.class).in(Singleton.class);
|
||||||
|
|
||||||
bind(IBANValidator.class).in(Singleton.class);
|
|
||||||
bind(BtcValidator.class).in(Singleton.class);
|
|
||||||
bind(FiatVolumeValidator.class).in(Singleton.class);
|
|
||||||
bind(FiatPriceValidator.class).in(Singleton.class);
|
|
||||||
bind(AltcoinValidator.class).in(Singleton.class);
|
|
||||||
bind(InputValidator.class).in(Singleton.class);
|
|
||||||
bind(PasswordValidator.class).in(Singleton.class);
|
|
||||||
bind(Transitions.class).in(Singleton.class);
|
bind(Transitions.class).in(Singleton.class);
|
||||||
|
|
||||||
bind(Stage.class).toInstance(primaryStage);
|
bind(Stage.class).toInstance(primaryStage);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -53,6 +53,7 @@ public class AddressTextField extends AnchorPane {
|
||||||
public AddressTextField() {
|
public AddressTextField() {
|
||||||
TextField textField = new TextField();
|
TextField textField = new TextField();
|
||||||
textField.setId("address-text-field");
|
textField.setId("address-text-field");
|
||||||
|
textField.getStyleClass().addAll("highlight","show-hand");
|
||||||
textField.setEditable(false);
|
textField.setEditable(false);
|
||||||
textField.textProperty().bind(address);
|
textField.textProperty().bind(address);
|
||||||
String tooltipText = Res.get("addressTextField.openWallet");
|
String tooltipText = Res.get("addressTextField.openWallet");
|
||||||
|
@ -72,14 +73,14 @@ public class AddressTextField extends AnchorPane {
|
||||||
|
|
||||||
Label extWalletIcon = new Label();
|
Label extWalletIcon = new Label();
|
||||||
extWalletIcon.setLayoutY(3);
|
extWalletIcon.setLayoutY(3);
|
||||||
extWalletIcon.getStyleClass().add("copy-icon");
|
extWalletIcon.getStyleClass().addAll("icon", "highlight");
|
||||||
extWalletIcon.setTooltip(new Tooltip(tooltipText));
|
extWalletIcon.setTooltip(new Tooltip(tooltipText));
|
||||||
AwesomeDude.setIcon(extWalletIcon, AwesomeIcon.SIGNIN);
|
AwesomeDude.setIcon(extWalletIcon, AwesomeIcon.SIGNIN);
|
||||||
extWalletIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(this::openWallet));
|
extWalletIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(this::openWallet));
|
||||||
|
|
||||||
Label copyIcon = new Label();
|
Label copyIcon = new Label();
|
||||||
copyIcon.setLayoutY(3);
|
copyIcon.setLayoutY(3);
|
||||||
copyIcon.getStyleClass().add("copy-icon");
|
copyIcon.getStyleClass().addAll("icon", "highlight");
|
||||||
Tooltip.install(copyIcon, new Tooltip(Res.get("addressTextField.copyToClipboard")));
|
Tooltip.install(copyIcon, new Tooltip(Res.get("addressTextField.copyToClipboard")));
|
||||||
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
||||||
copyIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(() -> {
|
copyIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(() -> {
|
||||||
|
|
|
@ -22,6 +22,7 @@ public class AddressWithIconAndDirection extends AnchorPane {
|
||||||
public AddressWithIconAndDirection(String text, String address, AwesomeIcon awesomeIcon, boolean received) {
|
public AddressWithIconAndDirection(String text, String address, AwesomeIcon awesomeIcon, boolean received) {
|
||||||
Label directionIcon = new AutoTooltipLabel();
|
Label directionIcon = new AutoTooltipLabel();
|
||||||
directionIcon.setLayoutY(3);
|
directionIcon.setLayoutY(3);
|
||||||
|
directionIcon.getStyleClass().add("icon");
|
||||||
directionIcon.getStyleClass().add(received ? "received-funds-icon" : "sent-funds-icon");
|
directionIcon.getStyleClass().add(received ? "received-funds-icon" : "sent-funds-icon");
|
||||||
AwesomeDude.setIcon(directionIcon, received ? AwesomeIcon.SIGNIN : AwesomeIcon.SIGNOUT);
|
AwesomeDude.setIcon(directionIcon, received ? AwesomeIcon.SIGNIN : AwesomeIcon.SIGNOUT);
|
||||||
directionIcon.setMouseTransparent(true);
|
directionIcon.setMouseTransparent(true);
|
||||||
|
@ -45,7 +46,7 @@ public class AddressWithIconAndDirection extends AnchorPane {
|
||||||
|
|
||||||
openLinkIcon = new AutoTooltipLabel();
|
openLinkIcon = new AutoTooltipLabel();
|
||||||
openLinkIcon.setLayoutY(3);
|
openLinkIcon.setLayoutY(3);
|
||||||
openLinkIcon.getStyleClass().add("external-link-icon");
|
openLinkIcon.getStyleClass().addAll("icon", "highlight");
|
||||||
openLinkIcon.setOpacity(0.7);
|
openLinkIcon.setOpacity(0.7);
|
||||||
AwesomeDude.setIcon(openLinkIcon, awesomeIcon);
|
AwesomeDude.setIcon(openLinkIcon, awesomeIcon);
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ public class BsqAddressTextField extends AnchorPane {
|
||||||
public BsqAddressTextField() {
|
public BsqAddressTextField() {
|
||||||
TextField textField = new TextField();
|
TextField textField = new TextField();
|
||||||
textField.setId("address-text-field");
|
textField.setId("address-text-field");
|
||||||
|
textField.getStyleClass().addAll("highlight","show-hand");
|
||||||
textField.setEditable(false);
|
textField.setEditable(false);
|
||||||
textField.textProperty().bind(address);
|
textField.textProperty().bind(address);
|
||||||
String tooltipText = Res.get("addressTextField.copyToClipboard");
|
String tooltipText = Res.get("addressTextField.copyToClipboard");
|
||||||
|
@ -74,7 +75,7 @@ public class BsqAddressTextField extends AnchorPane {
|
||||||
|
|
||||||
Label copyIcon = new AutoTooltipLabel();
|
Label copyIcon = new AutoTooltipLabel();
|
||||||
copyIcon.setLayoutY(3);
|
copyIcon.setLayoutY(3);
|
||||||
copyIcon.getStyleClass().add("copy-icon");
|
copyIcon.getStyleClass().addAll("icon", "highlight");
|
||||||
copyIcon.setTooltip(new Tooltip(Res.get("addressTextField.copyToClipboard")));
|
copyIcon.setTooltip(new Tooltip(Res.get("addressTextField.copyToClipboard")));
|
||||||
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
||||||
copyIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(() -> {
|
copyIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(() -> {
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class HyperlinkWithIcon extends HBox {
|
||||||
hyperlink = new Hyperlink(text);
|
hyperlink = new Hyperlink(text);
|
||||||
|
|
||||||
icon = new AutoTooltipLabel();
|
icon = new AutoTooltipLabel();
|
||||||
icon.getStyleClass().add("external-link-icon");
|
icon.getStyleClass().addAll("icon", "highlight");
|
||||||
AwesomeDude.setIcon(icon, awesomeIcon);
|
AwesomeDude.setIcon(icon, awesomeIcon);
|
||||||
icon.setMinWidth(20);
|
icon.setMinWidth(20);
|
||||||
icon.setOpacity(0.7);
|
icon.setOpacity(0.7);
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class InfoDisplay extends Parent {
|
||||||
label.prefWidthProperty().bind(textFlow.widthProperty());
|
label.prefWidthProperty().bind(textFlow.widthProperty());
|
||||||
link.setVisited(false);
|
link.setVisited(false);
|
||||||
// focus border is a bit confusing here so we remove it
|
// focus border is a bit confusing here so we remove it
|
||||||
link.setStyle("-fx-focus-color: transparent;");
|
link.getStyleClass().add("hide-focus");
|
||||||
link.setOnAction(onAction.get());
|
link.setOnAction(onAction.get());
|
||||||
getParent().layout();
|
getParent().layout();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class TableGroupHeadline extends Pane {
|
||||||
private void setActive() {
|
private void setActive() {
|
||||||
setId("titled-group-bg-active");
|
setId("titled-group-bg-active");
|
||||||
label.setId("titled-group-bg-label-active");
|
label.setId("titled-group-bg-label-active");
|
||||||
|
label.getStyleClass().add("highlight");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getText() {
|
public String getText() {
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class TextFieldWithCopyIcon extends AnchorPane {
|
||||||
public TextFieldWithCopyIcon() {
|
public TextFieldWithCopyIcon() {
|
||||||
Label copyIcon = new AutoTooltipLabel();
|
Label copyIcon = new AutoTooltipLabel();
|
||||||
copyIcon.setLayoutY(3);
|
copyIcon.setLayoutY(3);
|
||||||
copyIcon.getStyleClass().add("copy-icon");
|
copyIcon.getStyleClass().addAll("icon", "highlight");
|
||||||
copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard")));
|
copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard")));
|
||||||
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
||||||
AnchorPane.setRightAnchor(copyIcon, 0.0);
|
AnchorPane.setRightAnchor(copyIcon, 0.0);
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class TxIdTextField extends AnchorPane {
|
||||||
|
|
||||||
copyIcon = new Label();
|
copyIcon = new Label();
|
||||||
copyIcon.setLayoutY(3);
|
copyIcon.setLayoutY(3);
|
||||||
copyIcon.getStyleClass().add("copy-icon");
|
copyIcon.getStyleClass().addAll("icon", "highlight");
|
||||||
copyIcon.setTooltip(new Tooltip(Res.get("txIdTextField.copyIcon.tooltip")));
|
copyIcon.setTooltip(new Tooltip(Res.get("txIdTextField.copyIcon.tooltip")));
|
||||||
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
||||||
AnchorPane.setRightAnchor(copyIcon, 30.0);
|
AnchorPane.setRightAnchor(copyIcon, 30.0);
|
||||||
|
@ -83,7 +83,7 @@ public class TxIdTextField extends AnchorPane {
|
||||||
Tooltip tooltip = new Tooltip(Res.get("txIdTextField.blockExplorerIcon.tooltip"));
|
Tooltip tooltip = new Tooltip(Res.get("txIdTextField.blockExplorerIcon.tooltip"));
|
||||||
|
|
||||||
blockExplorerIcon = new Label();
|
blockExplorerIcon = new Label();
|
||||||
blockExplorerIcon.getStyleClass().add("external-link-icon");
|
blockExplorerIcon.getStyleClass().addAll("icon", "highlight");
|
||||||
blockExplorerIcon.setTooltip(tooltip);
|
blockExplorerIcon.setTooltip(tooltip);
|
||||||
AwesomeDude.setIcon(blockExplorerIcon, AwesomeIcon.EXTERNAL_LINK);
|
AwesomeDude.setIcon(blockExplorerIcon, AwesomeIcon.EXTERNAL_LINK);
|
||||||
blockExplorerIcon.setMinWidth(20);
|
blockExplorerIcon.setMinWidth(20);
|
||||||
|
@ -92,6 +92,7 @@ public class TxIdTextField extends AnchorPane {
|
||||||
|
|
||||||
textField = new TextField();
|
textField = new TextField();
|
||||||
textField.setId("address-text-field");
|
textField.setId("address-text-field");
|
||||||
|
textField.getStyleClass().addAll("highlight","show-hand");
|
||||||
textField.setEditable(false);
|
textField.setEditable(false);
|
||||||
textField.setTooltip(tooltip);
|
textField.setTooltip(tooltip);
|
||||||
AnchorPane.setRightAnchor(textField, 80.0);
|
AnchorPane.setRightAnchor(textField, 80.0);
|
||||||
|
|
|
@ -285,7 +285,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
textField.setPrefWidth(115); //140
|
textField.setPrefWidth(115); //140
|
||||||
textField.setMouseTransparent(true);
|
textField.setMouseTransparent(true);
|
||||||
textField.setFocusTraversable(false);
|
textField.setFocusTraversable(false);
|
||||||
textField.setStyle("-fx-alignment: center; -fx-background-color: white;");
|
textField.getStyleClass().add("display-text-field");
|
||||||
|
|
||||||
Label label = new AutoTooltipLabel(text);
|
Label label = new AutoTooltipLabel(text);
|
||||||
label.setId("nav-balance-label");
|
label.setId("nav-balance-label");
|
||||||
|
@ -330,7 +330,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
final Button btcAverageIconButton = new Button("", btcAverageIcon);
|
final Button btcAverageIconButton = new Button("", btcAverageIcon);
|
||||||
btcAverageIconButton.setPadding(new Insets(-1, 0, -1, 0));
|
btcAverageIconButton.setPadding(new Insets(-1, 0, -1, 0));
|
||||||
btcAverageIconButton.setFocusTraversable(false);
|
btcAverageIconButton.setFocusTraversable(false);
|
||||||
btcAverageIconButton.setStyle("-fx-background-color: transparent;");
|
btcAverageIconButton.getStyleClass().add("hidden-icon-button");
|
||||||
HBox.setMargin(btcAverageIconButton, new Insets(0, 5, 0, 0));
|
HBox.setMargin(btcAverageIconButton, new Insets(0, 5, 0, 0));
|
||||||
btcAverageIconButton.setOnAction(e -> GUIUtil.openWebPage("https://bitcoinaverage.com"));
|
btcAverageIconButton.setOnAction(e -> GUIUtil.openWebPage("https://bitcoinaverage.com"));
|
||||||
btcAverageIconButton.setVisible(model.isFiatCurrencyPriceFeedSelected.get());
|
btcAverageIconButton.setVisible(model.isFiatCurrencyPriceFeedSelected.get());
|
||||||
|
@ -354,7 +354,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
final Button poloniexIconButton = new Button("", poloniexIcon);
|
final Button poloniexIconButton = new Button("", poloniexIcon);
|
||||||
poloniexIconButton.setPadding(new Insets(-3, 0, -3, 0));
|
poloniexIconButton.setPadding(new Insets(-3, 0, -3, 0));
|
||||||
poloniexIconButton.setFocusTraversable(false);
|
poloniexIconButton.setFocusTraversable(false);
|
||||||
poloniexIconButton.setStyle("-fx-background-color: transparent;");
|
poloniexIconButton.getStyleClass().add("hidden-icon-button");
|
||||||
HBox.setMargin(poloniexIconButton, new Insets(2, 3, 0, 0));
|
HBox.setMargin(poloniexIconButton, new Insets(2, 3, 0, 0));
|
||||||
poloniexIconButton.setOnAction(e -> GUIUtil.openWebPage("https://poloniex.com"));
|
poloniexIconButton.setOnAction(e -> GUIUtil.openWebPage("https://poloniex.com"));
|
||||||
poloniexIconButton.setVisible(model.isCryptoCurrencyPriceFeedSelected.get());
|
poloniexIconButton.setVisible(model.isCryptoCurrencyPriceFeedSelected.get());
|
||||||
|
@ -399,7 +399,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
} else {
|
} else {
|
||||||
label.setText(Res.get("mainView.marketPrice.bisqInternalPrice"));
|
label.setText(Res.get("mainView.marketPrice.bisqInternalPrice"));
|
||||||
final Tooltip tooltip = new Tooltip(Res.get("mainView.marketPrice.tooltip.bisqInternalPrice"));
|
final Tooltip tooltip = new Tooltip(Res.get("mainView.marketPrice.tooltip.bisqInternalPrice"));
|
||||||
tooltip.setStyle("-fx-font-size: 12");
|
tooltip.getStyleClass().add("market-price-tooltip");
|
||||||
label.setTooltip(tooltip);
|
label.setTooltip(tooltip);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -425,7 +425,10 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
// createBitcoinInfoBox
|
// createBitcoinInfoBox
|
||||||
btcSplashInfo = new AutoTooltipLabel();
|
btcSplashInfo = new AutoTooltipLabel();
|
||||||
btcSplashInfo.textProperty().bind(model.btcInfo);
|
btcSplashInfo.textProperty().bind(model.btcInfo);
|
||||||
walletServiceErrorMsgListener = (ov, oldValue, newValue) -> btcSplashInfo.setId("splash-error-state-msg");
|
walletServiceErrorMsgListener = (ov, oldValue, newValue) -> {
|
||||||
|
btcSplashInfo.setId("splash-error-state-msg");
|
||||||
|
btcSplashInfo.getStyleClass().add("error-text");
|
||||||
|
};
|
||||||
model.walletServiceErrorMsg.addListener(walletServiceErrorMsgListener);
|
model.walletServiceErrorMsg.addListener(walletServiceErrorMsgListener);
|
||||||
|
|
||||||
btcSyncIndicator = new ProgressBar();
|
btcSyncIndicator = new ProgressBar();
|
||||||
|
@ -467,6 +470,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
splashP2PNetworkErrorMsgListener = (ov, oldValue, newValue) -> {
|
splashP2PNetworkErrorMsgListener = (ov, oldValue, newValue) -> {
|
||||||
if (newValue != null) {
|
if (newValue != null) {
|
||||||
splashP2PNetworkLabel.setId("splash-error-state-msg");
|
splashP2PNetworkLabel.setId("splash-error-state-msg");
|
||||||
|
splashP2PNetworkLabel.getStyleClass().add("error-text");
|
||||||
splashP2PNetworkBusyAnimation.stop();
|
splashP2PNetworkBusyAnimation.stop();
|
||||||
} else if (model.splashP2PNetworkAnimationVisible.get()) {
|
} else if (model.splashP2PNetworkAnimationVisible.get()) {
|
||||||
splashP2PNetworkBusyAnimation.play();
|
splashP2PNetworkBusyAnimation.play();
|
||||||
|
@ -555,6 +559,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
model.walletServiceErrorMsg.addListener((ov, oldValue, newValue) -> {
|
model.walletServiceErrorMsg.addListener((ov, oldValue, newValue) -> {
|
||||||
if (newValue != null) {
|
if (newValue != null) {
|
||||||
btcInfoLabel.setId("splash-error-state-msg");
|
btcInfoLabel.setId("splash-error-state-msg");
|
||||||
|
btcInfoLabel.getStyleClass().add("error-text");
|
||||||
if (btcNetworkWarnMsgPopup == null) {
|
if (btcNetworkWarnMsgPopup == null) {
|
||||||
btcNetworkWarnMsgPopup = new Popup<>().warning(newValue);
|
btcNetworkWarnMsgPopup = new Popup<>().warning(newValue);
|
||||||
btcNetworkWarnMsgPopup.show();
|
btcNetworkWarnMsgPopup.show();
|
||||||
|
@ -591,12 +596,13 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
});
|
});
|
||||||
setBottomAnchor(versionLabel, 7d);
|
setBottomAnchor(versionLabel, 7d);
|
||||||
model.newVersionAvailableProperty.addListener((observable, oldValue, newValue) -> {
|
model.newVersionAvailableProperty.addListener((observable, oldValue, newValue) -> {
|
||||||
|
versionLabel.getStyleClass().removeAll("version-new","version");
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
versionLabel.setStyle("-fx-text-fill: -bs-error-red; -fx-underline: true; -fx-cursor: hand;");
|
versionLabel.getStyleClass().add("version-new");
|
||||||
versionLabel.setOnMouseClicked(e -> model.openDownloadWindow());
|
versionLabel.setOnMouseClicked(e -> model.openDownloadWindow());
|
||||||
versionLabel.setText("v" + Version.VERSION + " " + Res.get("mainView.version.update"));
|
versionLabel.setText("v" + Version.VERSION + " " + Res.get("mainView.version.update"));
|
||||||
} else {
|
} else {
|
||||||
versionLabel.setStyle("-fx-text-fill: black; -fx-underline: false; -fx-cursor: null;");
|
versionLabel.getStyleClass().add("version");
|
||||||
versionLabel.setOnMouseClicked(null);
|
versionLabel.setOnMouseClicked(null);
|
||||||
versionLabel.setText("v" + Version.VERSION);
|
versionLabel.setText("v" + Version.VERSION);
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,9 +104,9 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
||||||
|
|
||||||
seedWordsValidChangeListener = (observable, oldValue, newValue) -> {
|
seedWordsValidChangeListener = (observable, oldValue, newValue) -> {
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
seedWordsTextArea.getStyleClass().remove("validation_error");
|
seedWordsTextArea.getStyleClass().remove("validation-error");
|
||||||
} else {
|
} else {
|
||||||
seedWordsTextArea.getStyleClass().add("validation_error");
|
seedWordsTextArea.getStyleClass().add("validation-error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -137,8 +137,8 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
||||||
.show();
|
.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
seedWordsTextArea.getStyleClass().remove("validation_error");
|
seedWordsTextArea.getStyleClass().remove("validation-error");
|
||||||
restoreDatePicker.getStyleClass().remove("validation_error");
|
restoreDatePicker.getStyleClass().remove("validation-error");
|
||||||
|
|
||||||
|
|
||||||
DeterministicSeed keyChainSeed = btcWalletService.getKeyChainSeed();
|
DeterministicSeed keyChainSeed = btcWalletService.getKeyChainSeed();
|
||||||
|
@ -178,8 +178,8 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
||||||
restoreDatePicker.setValue(null);
|
restoreDatePicker.setValue(null);
|
||||||
datePicker.setValue(null);
|
datePicker.setValue(null);
|
||||||
|
|
||||||
seedWordsTextArea.getStyleClass().remove("validation_error");
|
seedWordsTextArea.getStyleClass().remove("validation-error");
|
||||||
restoreDatePicker.getStyleClass().remove("validation_error");
|
restoreDatePicker.getStyleClass().remove("validation-error");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void askForPassword() {
|
private void askForPassword() {
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class ActiveCompensationRequestView extends ActivatableView<SplitPane, Vo
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
root.setDividerPositions(0.3, 0.7);
|
root.setDividerPositions(0.3, 0.7);
|
||||||
root.setStyle("-fx-background-insets: 0, 0 0 0 0");
|
root.getStyleClass().add("compensation-root");
|
||||||
AnchorPane topAnchorPane = new AnchorPane();
|
AnchorPane topAnchorPane = new AnchorPane();
|
||||||
root.getItems().add(topAnchorPane);
|
root.getItems().add(topAnchorPane);
|
||||||
|
|
||||||
|
|
|
@ -482,7 +482,7 @@ public class BsqTxView extends ActivatableView<GridPane, Void> {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Label label = AwesomeDude.createIconLabel(awesomeIcon);
|
Label label = AwesomeDude.createIconLabel(awesomeIcon);
|
||||||
label.getStyleClass().add(style);
|
label.getStyleClass().addAll("icon", style);
|
||||||
label.setTooltip(new Tooltip(toolTipText));
|
label.setTooltip(new Tooltip(toolTipText));
|
||||||
setGraphic(label);
|
setGraphic(label);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -707,7 +707,7 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
|
||||||
messageLabel.setWrapText(true);
|
messageLabel.setWrapText(true);
|
||||||
headerLabel.setTextAlignment(TextAlignment.CENTER);
|
headerLabel.setTextAlignment(TextAlignment.CENTER);
|
||||||
attachmentsBox.setSpacing(5);
|
attachmentsBox.setSpacing(5);
|
||||||
statusIcon.setStyle("-fx-font-size: 10;");
|
statusIcon.getStyleClass().add("small-text");
|
||||||
copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard")));
|
copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard")));
|
||||||
messageAnchorPane.getChildren().addAll(bg, arrow, headerLabel, messageLabel, copyIcon, attachmentsBox, statusIcon);
|
messageAnchorPane.getChildren().addAll(bg, arrow, headerLabel, messageLabel, copyIcon, attachmentsBox, statusIcon);
|
||||||
}
|
}
|
||||||
|
@ -740,15 +740,15 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
|
||||||
arrow.setManaged(!item.isSystemMessage());
|
arrow.setManaged(!item.isSystemMessage());
|
||||||
statusIcon.setVisible(false);
|
statusIcon.setVisible(false);
|
||||||
if (item.isSystemMessage()) {
|
if (item.isSystemMessage()) {
|
||||||
headerLabel.setStyle("-fx-text-fill: -bs-green; -fx-font-size: 11;");
|
headerLabel.getStyleClass().addAll("message-header","success-text");
|
||||||
bg.setId("message-bubble-green");
|
bg.setId("message-bubble-green");
|
||||||
messageLabel.setStyle("-fx-text-fill: white;");
|
messageLabel.getStyleClass().add("my-message");
|
||||||
copyIcon.setStyle("-fx-text-fill: white;");
|
copyIcon.getStyleClass().add("my-message");
|
||||||
} else if (isMyMsg) {
|
} else if (isMyMsg) {
|
||||||
headerLabel.setStyle("-fx-text-fill: -fx-accent; -fx-font-size: 11;");
|
headerLabel.getStyleClass().add("highlight");
|
||||||
bg.setId("message-bubble-blue");
|
bg.setId("message-bubble-blue");
|
||||||
messageLabel.setStyle("-fx-text-fill: white;");
|
messageLabel.getStyleClass().add("my-message");
|
||||||
copyIcon.setStyle("-fx-text-fill: white;");
|
copyIcon.getStyleClass().add("my-message");
|
||||||
if (isTrader)
|
if (isTrader)
|
||||||
arrow.setId("bubble_arrow_blue_left");
|
arrow.setId("bubble_arrow_blue_left");
|
||||||
else
|
else
|
||||||
|
@ -775,10 +775,10 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
|
||||||
/*else if (sendMsgProgressIndicator.getProgress() == 0)
|
/*else if (sendMsgProgressIndicator.getProgress() == 0)
|
||||||
showNotArrivedIcon();*/
|
showNotArrivedIcon();*/
|
||||||
} else {
|
} else {
|
||||||
headerLabel.setStyle("-fx-text-fill: -bs-light-grey; -fx-font-size: 11;");
|
headerLabel.getStyleClass().add("message-header");
|
||||||
bg.setId("message-bubble-grey");
|
bg.setId("message-bubble-grey");
|
||||||
messageLabel.setStyle("-fx-text-fill: black;");
|
messageLabel.getStyleClass().add("message");
|
||||||
copyIcon.setStyle("-fx-text-fill: black;");
|
copyIcon.getStyleClass().add("message");
|
||||||
if (isTrader)
|
if (isTrader)
|
||||||
arrow.setId("bubble_arrow_grey_right");
|
arrow.setId("bubble_arrow_grey_right");
|
||||||
else
|
else
|
||||||
|
@ -828,9 +828,9 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
|
||||||
attachmentsBox.getChildren().add(new Label(Res.get("support.attachments") + " ") {{
|
attachmentsBox.getChildren().add(new Label(Res.get("support.attachments") + " ") {{
|
||||||
setPadding(new Insets(0, 0, 3, 0));
|
setPadding(new Insets(0, 0, 3, 0));
|
||||||
if (isMyMsg)
|
if (isMyMsg)
|
||||||
setStyle("-fx-text-fill: white;");
|
getStyleClass().add("my-message");
|
||||||
else
|
else
|
||||||
setStyle("-fx-text-fill: black;");
|
getStyleClass().add("message");
|
||||||
}});
|
}});
|
||||||
item.getAttachments().stream().forEach(attachment -> {
|
item.getAttachments().stream().forEach(attachment -> {
|
||||||
final Label icon = new Label();
|
final Label icon = new Label();
|
||||||
|
@ -852,7 +852,7 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
|
||||||
|
|
||||||
// Need to set it here otherwise style is not correct
|
// Need to set it here otherwise style is not correct
|
||||||
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY, "16.0");
|
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY, "16.0");
|
||||||
copyIcon.getStyleClass().add("copy-icon-disputes");
|
copyIcon.getStyleClass().addAll("icon", "copy-icon-disputes");
|
||||||
|
|
||||||
// TODO There are still some cell rendering issues on updates
|
// TODO There are still some cell rendering issues on updates
|
||||||
setGraphic(messageAnchorPane);
|
setGraphic(messageAnchorPane);
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
||||||
titledGroupBg = addTitledGroupBg(gridPane, gridRow, 3, Res.get("funds.deposit.fundWallet"));
|
titledGroupBg = addTitledGroupBg(gridPane, gridRow, 3, Res.get("funds.deposit.fundWallet"));
|
||||||
|
|
||||||
qrCodeImageView = new ImageView();
|
qrCodeImageView = new ImageView();
|
||||||
qrCodeImageView.setStyle("-fx-cursor: hand;");
|
qrCodeImageView.getStyleClass().add("qr-code");
|
||||||
Tooltip.install(qrCodeImageView, new Tooltip(Res.get("shared.openLargeQRWindow")));
|
Tooltip.install(qrCodeImageView, new Tooltip(Res.get("shared.openLargeQRWindow")));
|
||||||
qrCodeImageView.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(
|
qrCodeImageView.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(
|
||||||
() -> UserThread.runAfter(
|
() -> UserThread.runAfter(
|
||||||
|
|
|
@ -454,7 +454,7 @@ public class OfferBookChartView extends ActivatableViewAndModel<VBox, OfferBookC
|
||||||
tableView.setPlaceholder(placeholder);
|
tableView.setPlaceholder(placeholder);
|
||||||
|
|
||||||
Label titleLabel = new AutoTooltipLabel();
|
Label titleLabel = new AutoTooltipLabel();
|
||||||
titleLabel.setStyle("-fx-font-weight: bold; -fx-font-size: 16; -fx-alignment: center");
|
titleLabel.getStyleClass().add("table-title ");
|
||||||
UserThread.execute(() -> titleLabel.prefWidthProperty().bind(tableView.widthProperty()));
|
UserThread.execute(() -> titleLabel.prefWidthProperty().bind(tableView.widthProperty()));
|
||||||
|
|
||||||
boolean isSellOffer = direction == OfferPayload.Direction.SELL;
|
boolean isSellOffer = direction == OfferPayload.Direction.SELL;
|
||||||
|
|
|
@ -930,7 +930,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||||
|
|
||||||
qrCodeImageView = new ImageView();
|
qrCodeImageView = new ImageView();
|
||||||
qrCodeImageView.setVisible(false);
|
qrCodeImageView.setVisible(false);
|
||||||
qrCodeImageView.setStyle("-fx-cursor: hand;");
|
qrCodeImageView.getStyleClass().add("qr-code");
|
||||||
Tooltip.install(qrCodeImageView, new Tooltip(Res.get("shared.openLargeQRWindow")));
|
Tooltip.install(qrCodeImageView, new Tooltip(Res.get("shared.openLargeQRWindow")));
|
||||||
qrCodeImageView.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(
|
qrCodeImageView.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(
|
||||||
() -> UserThread.runAfter(
|
() -> UserThread.runAfter(
|
||||||
|
@ -1118,10 +1118,13 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||||
fixedPriceButton.setMouseTransparent(fixedPriceSelected);
|
fixedPriceButton.setMouseTransparent(fixedPriceSelected);
|
||||||
useMarketBasedPriceButton.setMouseTransparent(!fixedPriceSelected);
|
useMarketBasedPriceButton.setMouseTransparent(!fixedPriceSelected);
|
||||||
|
|
||||||
fixedPriceButton.setStyle(fixedPriceSelected ?
|
fixedPriceButton.getStyleClass().removeAll("toggle-button-active","toggle-button-inactive");
|
||||||
"-fx-background-color: -bs-blue-transparent" : "-fx-background-color: -bs-very-light-grey");
|
useMarketBasedPriceButton.getStyleClass().removeAll("toggle-button-active","toggle-button-inactive");
|
||||||
useMarketBasedPriceButton.setStyle(!fixedPriceSelected ?
|
|
||||||
"-fx-background-color: -bs-blue-transparent" : "-fx-background-color: -bs-very-light-grey");
|
fixedPriceButton.getStyleClass().add(fixedPriceSelected ?
|
||||||
|
"toggle-button-active" : "toggle-button-inactive");
|
||||||
|
useMarketBasedPriceButton.getStyleClass().add(!fixedPriceSelected ?
|
||||||
|
"toggle-button-active" : "toggle-button-inactive");
|
||||||
|
|
||||||
if (fixedPriceSelected) {
|
if (fixedPriceSelected) {
|
||||||
if (firstRowHBox.getChildren().contains(percentagePriceBox))
|
if (firstRowHBox.getChildren().contains(percentagePriceBox))
|
||||||
|
@ -1160,7 +1163,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||||
|
|
||||||
marketBasedPriceTextField.setPromptText(Res.get("shared.enterPercentageValue"));
|
marketBasedPriceTextField.setPromptText(Res.get("shared.enterPercentageValue"));
|
||||||
marketBasedPriceLabel.setText("%");
|
marketBasedPriceLabel.setText("%");
|
||||||
marketBasedPriceLabel.setStyle("-fx-alignment: center;");
|
marketBasedPriceLabel.getStyleClass().add("percentage-label");
|
||||||
|
|
||||||
Tuple3<HBox, InputTextField, Label> amountValueCurrencyBoxTuple = getEditableValueCurrencyBox(
|
Tuple3<HBox, InputTextField, Label> amountValueCurrencyBoxTuple = getEditableValueCurrencyBox(
|
||||||
Res.get("createOffer.amount.prompt"));
|
Res.get("createOffer.amount.prompt"));
|
||||||
|
@ -1196,6 +1199,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||||
|
|
||||||
private void setupTotalToPayInfoIconLabel() {
|
private void setupTotalToPayInfoIconLabel() {
|
||||||
totalToPayInfoIconLabel.setId("clickable-icon");
|
totalToPayInfoIconLabel.setId("clickable-icon");
|
||||||
|
totalToPayInfoIconLabel.getStyleClass().addAll("highlight", "show-hand");
|
||||||
AwesomeDude.setIcon(totalToPayInfoIconLabel, AwesomeIcon.QUESTION_SIGN);
|
AwesomeDude.setIcon(totalToPayInfoIconLabel, AwesomeIcon.QUESTION_SIGN);
|
||||||
|
|
||||||
totalToPayInfoIconLabel.setOnMouseEntered(e -> createInfoPopover());
|
totalToPayInfoIconLabel.setOnMouseEntered(e -> createInfoPopover());
|
||||||
|
@ -1221,7 +1225,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||||
addPayInfoEntry(infoGridPane, i++, Res.get("createOffer.fundsBox.networkFee"), model.getTxFee());
|
addPayInfoEntry(infoGridPane, i++, Res.get("createOffer.fundsBox.networkFee"), model.getTxFee());
|
||||||
Separator separator = new Separator();
|
Separator separator = new Separator();
|
||||||
separator.setOrientation(Orientation.HORIZONTAL);
|
separator.setOrientation(Orientation.HORIZONTAL);
|
||||||
separator.setStyle("-fx-background: #666;");
|
separator.getStyleClass().add("offer-separator");
|
||||||
GridPane.setConstraints(separator, 1, i++);
|
GridPane.setConstraints(separator, 1, i++);
|
||||||
infoGridPane.getChildren().add(separator);
|
infoGridPane.getChildren().add(separator);
|
||||||
addPayInfoEntry(infoGridPane, i, Res.getWithCol("shared.total"), model.getTotalToPayInfo());
|
addPayInfoEntry(infoGridPane, i, Res.getWithCol("shared.total"), model.getTotalToPayInfo());
|
||||||
|
|
|
@ -804,7 +804,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||||
|
|
||||||
qrCodeImageView = new ImageView();
|
qrCodeImageView = new ImageView();
|
||||||
qrCodeImageView.setVisible(false);
|
qrCodeImageView.setVisible(false);
|
||||||
qrCodeImageView.setStyle("-fx-cursor: hand;");
|
qrCodeImageView.getStyleClass().add("qr-code");
|
||||||
Tooltip.install(qrCodeImageView, new Tooltip(Res.get("shared.openLargeQRWindow")));
|
Tooltip.install(qrCodeImageView, new Tooltip(Res.get("shared.openLargeQRWindow")));
|
||||||
qrCodeImageView.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(
|
qrCodeImageView.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(
|
||||||
() -> UserThread.runAfter(
|
() -> UserThread.runAfter(
|
||||||
|
@ -959,8 +959,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||||
priceAsPercentageInputBox = priceAsPercentageInputBoxTuple.second;
|
priceAsPercentageInputBox = priceAsPercentageInputBoxTuple.second;
|
||||||
|
|
||||||
priceAsPercentageLabel.setText("%");
|
priceAsPercentageLabel.setText("%");
|
||||||
priceAsPercentageLabel.setStyle("-fx-alignment: center;");
|
priceAsPercentageLabel.getStyleClass().add("percentage-label");
|
||||||
|
|
||||||
|
|
||||||
Tuple3<HBox, TextField, Label> amountValueCurrencyBoxTuple = getNonEditableValueCurrencyBox();
|
Tuple3<HBox, TextField, Label> amountValueCurrencyBoxTuple = getNonEditableValueCurrencyBox();
|
||||||
HBox amountValueCurrencyBox = amountValueCurrencyBoxTuple.first;
|
HBox amountValueCurrencyBox = amountValueCurrencyBoxTuple.first;
|
||||||
|
@ -1004,6 +1003,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||||
|
|
||||||
private void setupTotalToPayInfoIconLabel() {
|
private void setupTotalToPayInfoIconLabel() {
|
||||||
totalToPayInfoIconLabel.setId("clickable-icon");
|
totalToPayInfoIconLabel.setId("clickable-icon");
|
||||||
|
totalToPayInfoIconLabel.getStyleClass().addAll("highlight", "show-hand");
|
||||||
AwesomeDude.setIcon(totalToPayInfoIconLabel, AwesomeIcon.QUESTION_SIGN);
|
AwesomeDude.setIcon(totalToPayInfoIconLabel, AwesomeIcon.QUESTION_SIGN);
|
||||||
|
|
||||||
totalToPayInfoIconLabel.setOnMouseEntered(e -> createInfoPopover());
|
totalToPayInfoIconLabel.setOnMouseEntered(e -> createInfoPopover());
|
||||||
|
@ -1029,7 +1029,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||||
addPayInfoEntry(infoGridPane, i++, Res.get("takeOffer.fundsBox.networkFee"), model.getTxFee());
|
addPayInfoEntry(infoGridPane, i++, Res.get("takeOffer.fundsBox.networkFee"), model.getTxFee());
|
||||||
Separator separator = new Separator();
|
Separator separator = new Separator();
|
||||||
separator.setOrientation(Orientation.HORIZONTAL);
|
separator.setOrientation(Orientation.HORIZONTAL);
|
||||||
separator.setStyle("-fx-background: #666;");
|
separator.getStyleClass().add("offer-separator");
|
||||||
GridPane.setConstraints(separator, 1, i++);
|
GridPane.setConstraints(separator, 1, i++);
|
||||||
infoGridPane.getChildren().add(separator);
|
infoGridPane.getChildren().add(separator);
|
||||||
addPayInfoEntry(infoGridPane, i, Res.getWithCol("shared.total"),
|
addPayInfoEntry(infoGridPane, i, Res.getWithCol("shared.total"),
|
||||||
|
|
|
@ -705,7 +705,7 @@ public abstract class Overlay<T extends Overlay> {
|
||||||
Separator separator = new Separator();
|
Separator separator = new Separator();
|
||||||
separator.setMouseTransparent(true);
|
separator.setMouseTransparent(true);
|
||||||
separator.setOrientation(Orientation.HORIZONTAL);
|
separator.setOrientation(Orientation.HORIZONTAL);
|
||||||
separator.setStyle("-fx-background: #ccc;");
|
separator.getStyleClass().add("separator");
|
||||||
GridPane.setHalignment(separator, HPos.CENTER);
|
GridPane.setHalignment(separator, HPos.CENTER);
|
||||||
GridPane.setRowIndex(separator, ++rowIndex);
|
GridPane.setRowIndex(separator, ++rowIndex);
|
||||||
GridPane.setColumnSpan(separator, 2);
|
GridPane.setColumnSpan(separator, 2);
|
||||||
|
|
|
@ -84,11 +84,7 @@ public class ContractWindow extends Overlay<ContractWindow> {
|
||||||
protected void createGridPane() {
|
protected void createGridPane() {
|
||||||
super.createGridPane();
|
super.createGridPane();
|
||||||
gridPane.setPadding(new Insets(35, 40, 30, 40));
|
gridPane.setPadding(new Insets(35, 40, 30, 40));
|
||||||
gridPane.setStyle("-fx-background-color: -bs-content-bg-grey;" +
|
gridPane.getStyleClass().add("grid-pane");
|
||||||
"-fx-background-radius: 5 5 5 5;" +
|
|
||||||
"-fx-effect: dropshadow(gaussian, #999, 10, 0, 0, 0);" +
|
|
||||||
"-fx-background-insets: 10;"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addContent() {
|
private void addContent() {
|
||||||
|
|
|
@ -69,14 +69,14 @@ public class DisplayAlertMessageWindow extends Overlay<DisplayAlertMessageWindow
|
||||||
FormBuilder.addMultilineLabel(gridPane, ++rowIndex, alert.getMessage(), 10);
|
FormBuilder.addMultilineLabel(gridPane, ++rowIndex, alert.getMessage(), 10);
|
||||||
if (alert.isUpdateInfo()) {
|
if (alert.isUpdateInfo()) {
|
||||||
headLine = Res.get("displayAlertMessageWindow.update.headline");
|
headLine = Res.get("displayAlertMessageWindow.update.headline");
|
||||||
headLineLabel.setStyle("-fx-text-fill: -fx-accent; -fx-font-weight: bold; -fx-font-size: 22;");
|
headLineLabel.getStyleClass().addAll("headline-label","highlight");
|
||||||
String url = "https://bisq.network/downloads";
|
String url = "https://bisq.network/downloads";
|
||||||
HyperlinkWithIcon hyperlinkWithIcon = FormBuilder.addLabelHyperlinkWithIcon(gridPane, ++rowIndex,
|
HyperlinkWithIcon hyperlinkWithIcon = FormBuilder.addLabelHyperlinkWithIcon(gridPane, ++rowIndex,
|
||||||
Res.get("displayAlertMessageWindow.update.download"), url, url).second;
|
Res.get("displayAlertMessageWindow.update.download"), url, url).second;
|
||||||
hyperlinkWithIcon.setMaxWidth(550);
|
hyperlinkWithIcon.setMaxWidth(550);
|
||||||
} else {
|
} else {
|
||||||
headLine = Res.get("displayAlertMessageWindow.headline");
|
headLine = Res.get("displayAlertMessageWindow.headline");
|
||||||
headLineLabel.setStyle("-fx-text-fill: -bs-error-red; -fx-font-weight: bold; -fx-font-size: 22;");
|
headLineLabel.getStyleClass().addAll("headline-label", "error-text");
|
||||||
}
|
}
|
||||||
closeButton = new Button(Res.get("shared.close"));
|
closeButton = new Button(Res.get("shared.close"));
|
||||||
closeButton.setOnAction(e -> {
|
closeButton.setOnAction(e -> {
|
||||||
|
|
|
@ -152,11 +152,7 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
|
||||||
protected void createGridPane() {
|
protected void createGridPane() {
|
||||||
super.createGridPane();
|
super.createGridPane();
|
||||||
gridPane.setPadding(new Insets(35, 40, 30, 40));
|
gridPane.setPadding(new Insets(35, 40, 30, 40));
|
||||||
gridPane.setStyle("-fx-background-color: -bs-content-bg-grey;" +
|
gridPane.getStyleClass().add("grid-pane");
|
||||||
"-fx-background-radius: 5 5 5 5;" +
|
|
||||||
"-fx-effect: dropshadow(gaussian, #999, 10, 0, 0, 0);" +
|
|
||||||
"-fx-background-insets: 10;"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addContent() {
|
private void addContent() {
|
||||||
|
|
|
@ -130,11 +130,7 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
||||||
protected void createGridPane() {
|
protected void createGridPane() {
|
||||||
super.createGridPane();
|
super.createGridPane();
|
||||||
gridPane.setPadding(new Insets(35, 40, 30, 40));
|
gridPane.setPadding(new Insets(35, 40, 30, 40));
|
||||||
gridPane.setStyle("-fx-background-color: -bs-content-bg-grey;" +
|
gridPane.getStyleClass().add("grid-pane");
|
||||||
"-fx-background-radius: 5 5 5 5;" +
|
|
||||||
"-fx-effect: dropshadow(gaussian, #999, 10, 0, 0, 0);" +
|
|
||||||
"-fx-background-insets: 10;"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addContent() {
|
private void addContent() {
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class ShowWalletDataWindow extends Overlay<ShowWalletDataWindow> {
|
||||||
Label label = labelTextAreaTuple2.first;
|
Label label = labelTextAreaTuple2.first;
|
||||||
label.setMinWidth(150);
|
label.setMinWidth(150);
|
||||||
textArea.setPrefHeight(500);
|
textArea.setPrefHeight(500);
|
||||||
textArea.setStyle("-fx-font-size: 10;");
|
textArea.getStyleClass().add("small-text");
|
||||||
CheckBox isUpdateCheckBox = addLabelCheckBox(gridPane, ++rowIndex,
|
CheckBox isUpdateCheckBox = addLabelCheckBox(gridPane, ++rowIndex,
|
||||||
Res.get("showWalletDataWindow.includePrivKeys"), "").second;
|
Res.get("showWalletDataWindow.includePrivKeys"), "").second;
|
||||||
isUpdateCheckBox.setSelected(false);
|
isUpdateCheckBox.setSelected(false);
|
||||||
|
|
|
@ -79,11 +79,11 @@ public class TacWindow extends Overlay<TacWindow> {
|
||||||
@Override
|
@Override
|
||||||
protected void addMessage() {
|
protected void addMessage() {
|
||||||
super.addMessage();
|
super.addMessage();
|
||||||
String fontSize = smallScreen ? "9" : "12";
|
String fontStyleClass = smallScreen ? "small-text" : "normal-text";
|
||||||
messageLabel.setStyle("-fx-font-size: " + fontSize + ";");
|
messageLabel.getStyleClass().add(fontStyleClass);
|
||||||
HyperlinkWithIcon hyperlinkWithIcon = addHyperlinkWithIcon(gridPane, ++rowIndex, Res.get("tacWindow.arbitrationSystem"),
|
HyperlinkWithIcon hyperlinkWithIcon = addHyperlinkWithIcon(gridPane, ++rowIndex, Res.get("tacWindow.arbitrationSystem"),
|
||||||
"https://bisq.network/arbitration_system.pdf");
|
"https://bisq.network/arbitration_system.pdf");
|
||||||
hyperlinkWithIcon.setStyle("-fx-font-size: " + fontSize + ";");
|
hyperlinkWithIcon.getStyleClass().add(fontStyleClass);
|
||||||
GridPane.setMargin(hyperlinkWithIcon, new Insets(-6, 0, -20, -4));
|
GridPane.setMargin(hyperlinkWithIcon, new Insets(-6, 0, -20, -4));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ public class TorNetworkSettingsWindow extends Overlay<TorNetworkSettingsWindow>
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addContent() {
|
private void addContent() {
|
||||||
gridPane.setStyle("-fx-background-color: #f8f8f8;");
|
gridPane.getStyleClass().add("grid-pane");
|
||||||
|
|
||||||
Label label = addLabel(gridPane, ++rowIndex, Res.get("torNetworkSettingWindow.info"));
|
Label label = addLabel(gridPane, ++rowIndex, Res.get("torNetworkSettingWindow.info"));
|
||||||
label.setWrapText(true);
|
label.setWrapText(true);
|
||||||
|
|
|
@ -98,11 +98,7 @@ public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
|
||||||
protected void createGridPane() {
|
protected void createGridPane() {
|
||||||
super.createGridPane();
|
super.createGridPane();
|
||||||
gridPane.setPadding(new Insets(35, 40, 30, 40));
|
gridPane.setPadding(new Insets(35, 40, 30, 40));
|
||||||
gridPane.setStyle("-fx-background-color: -bs-content-bg-grey;" +
|
gridPane.getStyleClass().add("grid-pane");
|
||||||
"-fx-background-radius: 5 5 5 5;" +
|
|
||||||
"-fx-effect: dropshadow(gaussian, #999, 10, 0, 0, 0);" +
|
|
||||||
"-fx-background-insets: 10;"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addContent() {
|
private void addContent() {
|
||||||
|
|
|
@ -138,8 +138,8 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
||||||
restoreButton.setOnAction(null);
|
restoreButton.setOnAction(null);
|
||||||
seedWordsTextArea.setText("");
|
seedWordsTextArea.setText("");
|
||||||
datePicker.setValue(null);
|
datePicker.setValue(null);
|
||||||
seedWordsTextArea.getStyleClass().remove("validation_error");
|
seedWordsTextArea.getStyleClass().remove("validation-error");
|
||||||
datePicker.getStyleClass().remove("validation_error");
|
datePicker.getStyleClass().remove("validation-error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
||||||
Separator separator = new Separator();
|
Separator separator = new Separator();
|
||||||
separator.setMouseTransparent(true);
|
separator.setMouseTransparent(true);
|
||||||
separator.setOrientation(Orientation.HORIZONTAL);
|
separator.setOrientation(Orientation.HORIZONTAL);
|
||||||
separator.setStyle("-fx-background: #ccc;");
|
separator.getStyleClass().add("separator");
|
||||||
GridPane.setHalignment(separator, HPos.CENTER);
|
GridPane.setHalignment(separator, HPos.CENTER);
|
||||||
GridPane.setRowIndex(separator, ++rowIndex);
|
GridPane.setRowIndex(separator, ++rowIndex);
|
||||||
GridPane.setColumnSpan(separator, 2);
|
GridPane.setColumnSpan(separator, 2);
|
||||||
|
@ -267,7 +267,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
||||||
Tuple2<Label, TextArea> tuple = addLabelTextArea(gridPane, ++rowIndex, Res.get("seed.seedWords"), "", 5);
|
Tuple2<Label, TextArea> tuple = addLabelTextArea(gridPane, ++rowIndex, Res.get("seed.seedWords"), "", 5);
|
||||||
seedWordsTextArea = tuple.second;
|
seedWordsTextArea = tuple.second;
|
||||||
seedWordsTextArea.setPrefHeight(60);
|
seedWordsTextArea.setPrefHeight(60);
|
||||||
seedWordsTextArea.setStyle("-fx-border-color: #ddd;");
|
seedWordsTextArea.getStyleClass().add("text-area");
|
||||||
|
|
||||||
Tuple2<Label, DatePicker> labelDatePickerTuple2 = addLabelDatePicker(gridPane, ++rowIndex,
|
Tuple2<Label, DatePicker> labelDatePickerTuple2 = addLabelDatePicker(gridPane, ++rowIndex,
|
||||||
Res.get("seed.creationDate"));
|
Res.get("seed.creationDate"));
|
||||||
|
@ -286,9 +286,9 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
||||||
|
|
||||||
seedWordsValidChangeListener = (observable, oldValue, newValue) -> {
|
seedWordsValidChangeListener = (observable, oldValue, newValue) -> {
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
seedWordsTextArea.getStyleClass().remove("validation_error");
|
seedWordsTextArea.getStyleClass().remove("validation-error");
|
||||||
} else {
|
} else {
|
||||||
seedWordsTextArea.getStyleClass().add("validation_error");
|
seedWordsTextArea.getStyleClass().add("validation-error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -310,8 +310,8 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
||||||
|
|
||||||
restoreButton.setOnAction(e -> onRestore());
|
restoreButton.setOnAction(e -> onRestore());
|
||||||
|
|
||||||
seedWordsTextArea.getStyleClass().remove("validation_error");
|
seedWordsTextArea.getStyleClass().remove("validation-error");
|
||||||
datePicker.getStyleClass().remove("validation_error");
|
datePicker.getStyleClass().remove("validation-error");
|
||||||
|
|
||||||
layout();
|
layout();
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class DisplayUpdateDownloadWindow extends Overlay<DisplayUpdateDownloadWi
|
||||||
|
|
||||||
private void addContent() {
|
private void addContent() {
|
||||||
headLine = "Important update information!";
|
headLine = "Important update information!";
|
||||||
headLineLabel.setStyle("-fx-text-fill: -fx-accent; -fx-font-weight: bold; -fx-font-size: 22;");
|
headLineLabel.getStyleClass().addAll("headline-label", "highlight");
|
||||||
|
|
||||||
checkNotNull(alert, "alertMessage must not be null");
|
checkNotNull(alert, "alertMessage must not be null");
|
||||||
addMultilineLabel(gridPane, ++rowIndex, alert.getMessage(), 10);
|
addMultilineLabel(gridPane, ++rowIndex, alert.getMessage(), 10);
|
||||||
|
@ -96,7 +96,7 @@ public class DisplayUpdateDownloadWindow extends Overlay<DisplayUpdateDownloadWi
|
||||||
Separator separator = new Separator();
|
Separator separator = new Separator();
|
||||||
separator.setMouseTransparent(true);
|
separator.setMouseTransparent(true);
|
||||||
separator.setOrientation(Orientation.HORIZONTAL);
|
separator.setOrientation(Orientation.HORIZONTAL);
|
||||||
separator.setStyle("-fx-background: #ccc;");
|
separator.getStyleClass().add("separator");
|
||||||
GridPane.setHalignment(separator, HPos.CENTER);
|
GridPane.setHalignment(separator, HPos.CENTER);
|
||||||
GridPane.setRowIndex(separator, ++rowIndex);
|
GridPane.setRowIndex(separator, ++rowIndex);
|
||||||
GridPane.setColumnSpan(separator, 2);
|
GridPane.setColumnSpan(separator, 2);
|
||||||
|
@ -160,7 +160,7 @@ public class DisplayUpdateDownloadWindow extends Overlay<DisplayUpdateDownloadWi
|
||||||
Separator separator2 = new Separator();
|
Separator separator2 = new Separator();
|
||||||
separator2.setMouseTransparent(true);
|
separator2.setMouseTransparent(true);
|
||||||
separator2.setOrientation(Orientation.HORIZONTAL);
|
separator2.setOrientation(Orientation.HORIZONTAL);
|
||||||
separator2.setStyle("-fx-background: #ccc;");
|
separator2.getStyleClass().add("separator");
|
||||||
GridPane.setHalignment(separator2, HPos.CENTER);
|
GridPane.setHalignment(separator2, HPos.CENTER);
|
||||||
GridPane.setRowIndex(separator2, ++rowIndex);
|
GridPane.setRowIndex(separator2, ++rowIndex);
|
||||||
GridPane.setColumnSpan(separator2, 2);
|
GridPane.setColumnSpan(separator2, 2);
|
||||||
|
@ -206,12 +206,13 @@ public class DisplayUpdateDownloadWindow extends Overlay<DisplayUpdateDownloadWi
|
||||||
List<BisqInstaller.FileDescriptor> downloadResults = downloadTask.getValue();
|
List<BisqInstaller.FileDescriptor> downloadResults = downloadTask.getValue();
|
||||||
Optional<BisqInstaller.FileDescriptor> downloadFailed = downloadResults.stream()
|
Optional<BisqInstaller.FileDescriptor> downloadFailed = downloadResults.stream()
|
||||||
.filter(fileDescriptor -> !BisqInstaller.DownloadStatusEnum.OK.equals(fileDescriptor.getDownloadStatus())).findFirst();
|
.filter(fileDescriptor -> !BisqInstaller.DownloadStatusEnum.OK.equals(fileDescriptor.getDownloadStatus())).findFirst();
|
||||||
|
downloadedFilesLabel.getStyleClass().removeAll("error-text","success-text");
|
||||||
if (downloadResults == null || downloadResults.isEmpty() || downloadFailed.isPresent()) {
|
if (downloadResults == null || downloadResults.isEmpty() || downloadFailed.isPresent()) {
|
||||||
showErrorMessage(downloadButton, statusLabel, downloadFailedString);
|
showErrorMessage(downloadButton, statusLabel, downloadFailedString);
|
||||||
downloadedFilesLabel.setStyle("-fx-text-fill: -bs-error-red;");
|
downloadedFilesLabel.getStyleClass().add("error-text");
|
||||||
} else {
|
} else {
|
||||||
log.debug("Download completed successfully.");
|
log.debug("Download completed successfully.");
|
||||||
downloadedFilesLabel.setStyle("-fx-text-fill: -bs-green;");
|
downloadedFilesLabel.getStyleClass().add("success-text");
|
||||||
|
|
||||||
verifyTask = installer.verify(downloadResults);
|
verifyTask = installer.verify(downloadResults);
|
||||||
verifiedSigLabel.setOpacity(1);
|
verifiedSigLabel.setOpacity(1);
|
||||||
|
@ -234,7 +235,7 @@ public class DisplayUpdateDownloadWindow extends Overlay<DisplayUpdateDownloadWi
|
||||||
if (verifyResults == null || verifyResults.isEmpty() || verifyFailed.isPresent()) {
|
if (verifyResults == null || verifyResults.isEmpty() || verifyFailed.isPresent()) {
|
||||||
showErrorMessage(downloadButton, statusLabel, Res.get("displayUpdateDownloadWindow.verify.failed"));
|
showErrorMessage(downloadButton, statusLabel, Res.get("displayUpdateDownloadWindow.verify.failed"));
|
||||||
} else {
|
} else {
|
||||||
verifiedSigLabel.setStyle("-fx-text-fill: -bs-green;");
|
verifiedSigLabel.getStyleClass().add("success-text");
|
||||||
new Popup<>().feedback(Res.get("displayUpdateDownloadWindow.success"))
|
new Popup<>().feedback(Res.get("displayUpdateDownloadWindow.success"))
|
||||||
.actionButtonText(Res.get("displayUpdateDownloadWindow.download.openDir"))
|
.actionButtonText(Res.get("displayUpdateDownloadWindow.download.openDir"))
|
||||||
.onAction(() -> {
|
.onAction(() -> {
|
||||||
|
|
|
@ -307,13 +307,6 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
|
||||||
public void updateItem(final PendingTradesListItem item, boolean empty) {
|
public void updateItem(final PendingTradesListItem item, boolean empty) {
|
||||||
super.updateItem(item, empty);
|
super.updateItem(item, empty);
|
||||||
if (item != null && !empty) {
|
if (item != null && !empty) {
|
||||||
/* if (model.showDispute(item.getTrade())) {
|
|
||||||
setStyle("-fx-text-fill: -bs-error-red");
|
|
||||||
} else if (model.showWarning(item.getTrade())) {
|
|
||||||
setStyle("-fx-text-fill: -bs-warning");
|
|
||||||
} else {
|
|
||||||
setId("-fx-text-fill: black");
|
|
||||||
}*/
|
|
||||||
setText(formatter.formatDateTime(item.getTrade().getDate()));
|
setText(formatter.formatDateTime(item.getTrade().getDate()));
|
||||||
} else {
|
} else {
|
||||||
setText(null);
|
setText(null);
|
||||||
|
|
|
@ -214,13 +214,13 @@ public abstract class TradeStepView extends AnchorPane {
|
||||||
if (remainingTime != null) {
|
if (remainingTime != null) {
|
||||||
timeLeftTextField.setText(remainingTime);
|
timeLeftTextField.setText(remainingTime);
|
||||||
if (model.showWarning() || model.showDispute()) {
|
if (model.showWarning() || model.showDispute()) {
|
||||||
timeLeftTextField.setStyle("-fx-text-fill: -bs-error-red");
|
timeLeftTextField.getStyleClass().add("error-text");
|
||||||
timeLeftProgressBar.setStyle("-fx-accent: -bs-error-red;");
|
timeLeftProgressBar.getStyleClass().add("error");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
timeLeftTextField.setText("Trade not completed in time (" + model.getDateForOpenDispute() + ")");
|
timeLeftTextField.setText("Trade not completed in time (" + model.getDateForOpenDispute() + ")");
|
||||||
timeLeftTextField.setStyle("-fx-text-fill: -bs-error-red");
|
timeLeftTextField.getStyleClass().add("error-text");
|
||||||
timeLeftProgressBar.setStyle("-fx-accent: -bs-error-red;");
|
timeLeftProgressBar.getStyleClass().add("error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,13 +86,12 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>2.3</version>
|
<version>3.1.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- broken with Java 8 (MSHADE-174), using ProGuard instead. -->
|
<!-- broken with Java 8 (MSHADE-174), using ProGuard instead. -->
|
||||||
<minimizeJar>false</minimizeJar>
|
<minimizeJar>false</minimizeJar>
|
||||||
<transformers>
|
<transformers>
|
||||||
<transformer
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Main-Class>io.bisq.monitor.MonitorMain</Main-Class>
|
<Main-Class>io.bisq.monitor.MonitorMain</Main-Class>
|
||||||
<!-- the specified bouncy castle jar classes -->
|
<!-- the specified bouncy castle jar classes -->
|
||||||
|
|
|
@ -30,11 +30,10 @@ import java.util.UUID;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
// TODO close connection if failing
|
||||||
public class HttpClient {
|
public class HttpClient {
|
||||||
private static final Logger log = LoggerFactory.getLogger(HttpClient.class);
|
private static final Logger log = LoggerFactory.getLogger(HttpClient.class);
|
||||||
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private Socks5ProxyProvider socks5ProxyProvider;
|
private Socks5ProxyProvider socks5ProxyProvider;
|
||||||
@Getter
|
@Getter
|
||||||
|
|
|
@ -43,6 +43,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import java.security.PublicKey;
|
import java.security.PublicKey;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CopyOnWriteArraySet;
|
import java.util.concurrent.CopyOnWriteArraySet;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkArgument;
|
import static com.google.common.base.Preconditions.checkArgument;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -234,7 +235,6 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// SetupListener implementation
|
// SetupListener implementation
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTorNodeReady() {
|
public void onTorNodeReady() {
|
||||||
Log.traceCall();
|
Log.traceCall();
|
||||||
|
@ -284,8 +284,18 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
||||||
"seedNodeOfPreliminaryDataRequest must be present");
|
"seedNodeOfPreliminaryDataRequest must be present");
|
||||||
|
|
||||||
requestDataManager.requestUpdateData();
|
requestDataManager.requestUpdateData();
|
||||||
|
|
||||||
|
// If we start up first time we don't have any peers so we need to request from seed node.
|
||||||
|
// As well it can be that the persisted peer list is outdated with dead peers.
|
||||||
|
UserThread.runAfter(() -> {
|
||||||
|
peerExchangeManager.requestReportedPeersFromSeedNodes(seedNodeOfPreliminaryDataRequest.get());
|
||||||
|
}, 100, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
|
// If we have reported or persisted peers we try to connect to those
|
||||||
|
UserThread.runAfter(peerExchangeManager::initialRequestPeersFromReportedOrPersistedPeers, 300, TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// RequestDataManager.Listener implementation
|
// RequestDataManager.Listener implementation
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -299,11 +309,6 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpdatedDataReceived() {
|
public void onUpdatedDataReceived() {
|
||||||
Optional<NodeAddress> seedNodeOfPreliminaryDataRequest = requestDataManager.getNodeAddressOfPreliminaryDataRequest();
|
|
||||||
checkArgument(seedNodeOfPreliminaryDataRequest.isPresent(),
|
|
||||||
"seedNodeOfPreliminaryDataRequest must be present");
|
|
||||||
peerExchangeManager.requestReportedPeersFromSeedNodes(seedNodeOfPreliminaryDataRequest.get());
|
|
||||||
|
|
||||||
if (!isBootstrapped) {
|
if (!isBootstrapped) {
|
||||||
isBootstrapped = true;
|
isBootstrapped = true;
|
||||||
p2pServiceListeners.stream().forEach(P2PServiceListener::onBootstrapComplete);
|
p2pServiceListeners.stream().forEach(P2PServiceListener::onBootstrapComplete);
|
||||||
|
@ -445,6 +450,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NotNull Throwable throwable) {
|
public void onFailure(@NotNull Throwable throwable) {
|
||||||
|
log.error(throwable.toString());
|
||||||
throwable.printStackTrace();
|
throwable.printStackTrace();
|
||||||
sendDirectMessageListener.onFault();
|
sendDirectMessageListener.onFault();
|
||||||
}
|
}
|
||||||
|
@ -531,10 +537,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NotNull Throwable throwable) {
|
public void onFailure(@NotNull Throwable throwable) {
|
||||||
log.trace("SendEncryptedMailboxMessage onFailure");
|
log.info("We cannot send message to peer. Peer might be offline. We will store message in mailbox. peersNodeAddress=" + peersNodeAddress);
|
||||||
log.debug(throwable.toString());
|
|
||||||
log.debug("We cannot send message to peer. Peer might be offline. We will store message in mailbox.");
|
|
||||||
log.trace("create MailboxEntry with peerAddress " + peersNodeAddress);
|
|
||||||
PublicKey receiverStoragePublicKey = peersPubKeyRing.getSignaturePubKey();
|
PublicKey receiverStoragePublicKey = peersPubKeyRing.getSignaturePubKey();
|
||||||
addMailboxData(new MailboxStoragePayload(prefixedSealedAndSignedMessage,
|
addMailboxData(new MailboxStoragePayload(prefixedSealedAndSignedMessage,
|
||||||
keyRing.getSignatureKeyPair().getPublic(),
|
keyRing.getSignatureKeyPair().getPublic(),
|
||||||
|
|
|
@ -6,16 +6,12 @@ import javafx.beans.property.IntegerProperty;
|
||||||
import javafx.beans.property.LongProperty;
|
import javafx.beans.property.LongProperty;
|
||||||
import javafx.beans.property.SimpleIntegerProperty;
|
import javafx.beans.property.SimpleIntegerProperty;
|
||||||
import javafx.beans.property.SimpleLongProperty;
|
import javafx.beans.property.SimpleLongProperty;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public class Statistic {
|
public class Statistic {
|
||||||
private static final Logger log = LoggerFactory.getLogger(Statistic.class);
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Static
|
// Static
|
||||||
|
|
|
@ -254,7 +254,7 @@ public class TorNetworkNode extends NetworkNode {
|
||||||
|
|
||||||
public void onFailure(@NotNull Throwable throwable) {
|
public void onFailure(@NotNull Throwable throwable) {
|
||||||
UserThread.execute(() -> {
|
UserThread.execute(() -> {
|
||||||
log.error("Hidden service creation failed", throwable);
|
log.error("Hidden service creation failed" + throwable);
|
||||||
restartTor(throwable.getMessage());
|
restartTor(throwable.getMessage());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,22 +11,22 @@ import io.bisq.network.p2p.NodeAddress;
|
||||||
import io.bisq.network.p2p.network.Connection;
|
import io.bisq.network.p2p.network.Connection;
|
||||||
import io.bisq.network.p2p.network.NetworkNode;
|
import io.bisq.network.p2p.network.NetworkNode;
|
||||||
import io.bisq.network.p2p.storage.messages.BroadcastMessage;
|
import io.bisq.network.p2p.storage.messages.BroadcastMessage;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
public class BroadcastHandler implements PeerManager.Listener {
|
public class BroadcastHandler implements PeerManager.Listener {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
private static final long TIMEOUT = 60;
|
||||||
// Static
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(BroadcastHandler.class);
|
|
||||||
private static final long TIMEOUT = 120;
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Listener
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
interface ResultHandler {
|
interface ResultHandler {
|
||||||
void onCompleted(BroadcastHandler broadcastHandler);
|
void onCompleted(BroadcastHandler broadcastHandler);
|
||||||
|
@ -34,11 +34,6 @@ public class BroadcastHandler implements PeerManager.Listener {
|
||||||
void onFault(BroadcastHandler broadcastHandler);
|
void onFault(BroadcastHandler broadcastHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Listener
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public interface Listener {
|
public interface Listener {
|
||||||
@SuppressWarnings({"EmptyMethod", "UnusedParameters"})
|
@SuppressWarnings({"EmptyMethod", "UnusedParameters"})
|
||||||
void onBroadcasted(BroadcastMessage message, int numOfCompletedBroadcasts);
|
void onBroadcasted(BroadcastMessage message, int numOfCompletedBroadcasts);
|
||||||
|
@ -182,7 +177,7 @@ public class BroadcastHandler implements PeerManager.Listener {
|
||||||
public void onFailure(@NotNull Throwable throwable) {
|
public void onFailure(@NotNull Throwable throwable) {
|
||||||
numOfFailedBroadcasts++;
|
numOfFailedBroadcasts++;
|
||||||
if (!stopped) {
|
if (!stopped) {
|
||||||
log.debug("Broadcast to " + nodeAddress + " failed.\n\t" +
|
log.info("Broadcast to " + nodeAddress + " failed.\n\t" +
|
||||||
"ErrorMessage=" + throwable.getMessage());
|
"ErrorMessage=" + throwable.getMessage());
|
||||||
if (numOfCompletedBroadcasts + numOfFailedBroadcasts == numPeers)
|
if (numOfCompletedBroadcasts + numOfFailedBroadcasts == numPeers)
|
||||||
onFault("stopped at onFailure: " + errorMessage);
|
onFault("stopped at onFailure: " + errorMessage);
|
||||||
|
|
|
@ -14,6 +14,7 @@ import io.bisq.network.p2p.network.*;
|
||||||
import io.bisq.network.p2p.peers.peerexchange.Peer;
|
import io.bisq.network.p2p.peers.peerexchange.Peer;
|
||||||
import io.bisq.network.p2p.peers.peerexchange.PeerList;
|
import io.bisq.network.p2p.peers.peerexchange.PeerList;
|
||||||
import io.bisq.network.p2p.seed.SeedNodesRepository;
|
import io.bisq.network.p2p.seed.SeedNodesRepository;
|
||||||
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
@ -33,7 +34,7 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
|
|
||||||
private static final long CHECK_MAX_CONN_DELAY_SEC = 10;
|
private static final long CHECK_MAX_CONN_DELAY_SEC = 10;
|
||||||
// Use a long delay as the bootstrapping peer might need a while until it knows its onion address
|
// Use a long delay as the bootstrapping peer might need a while until it knows its onion address
|
||||||
private static final long REMOVE_ANONYMOUS_PEER_SEC = 120;
|
private static final long REMOVE_ANONYMOUS_PEER_SEC = 240;
|
||||||
|
|
||||||
private static final int MAX_REPORTED_PEERS = 1000;
|
private static final int MAX_REPORTED_PEERS = 1000;
|
||||||
private static final int MAX_PERSISTED_PEERS = 500;
|
private static final int MAX_PERSISTED_PEERS = 500;
|
||||||
|
@ -73,7 +74,9 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
private boolean stopped;
|
private boolean stopped;
|
||||||
private boolean lostAllConnections;
|
private boolean lostAllConnections;
|
||||||
|
|
||||||
|
@Getter
|
||||||
private int minConnections;
|
private int minConnections;
|
||||||
|
private int disconnectFromSeedNode;
|
||||||
private int maxConnectionsPeer;
|
private int maxConnectionsPeer;
|
||||||
private int maxConnectionsNonDirect;
|
private int maxConnectionsNonDirect;
|
||||||
private int maxConnectionsAbsolute;
|
private int maxConnectionsAbsolute;
|
||||||
|
@ -154,12 +157,14 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modify this to change the relationships between connection limits.
|
// Modify this to change the relationships between connection limits.
|
||||||
|
// maxConnections default 12
|
||||||
private void setConnectionLimits(int maxConnections) {
|
private void setConnectionLimits(int maxConnections) {
|
||||||
this.maxConnections = maxConnections;
|
this.maxConnections = maxConnections; // 12
|
||||||
minConnections = Math.max(1, maxConnections - 4);
|
disconnectFromSeedNode = Math.min(6, maxConnections + 1); // 6
|
||||||
maxConnectionsPeer = maxConnections + 4;
|
minConnections = Math.max(1, maxConnections - 4); // 1-8
|
||||||
maxConnectionsNonDirect = maxConnections + 8;
|
maxConnectionsPeer = maxConnections + 4; // 16
|
||||||
maxConnectionsAbsolute = maxConnections + 18;
|
maxConnectionsNonDirect = maxConnections + 8; // 20
|
||||||
|
maxConnectionsAbsolute = maxConnections + 18; // 30 -> seedNode with maxConnections=30 -> 48
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -244,7 +249,7 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
removeSuperfluousSeedNodes();
|
removeSuperfluousSeedNodes();
|
||||||
removeTooOldReportedPeers();
|
removeTooOldReportedPeers();
|
||||||
removeTooOldPersistedPeers();
|
removeTooOldPersistedPeers();
|
||||||
checkMaxConnections(maxConnections);
|
checkMaxConnections();
|
||||||
} else {
|
} else {
|
||||||
log.debug("We have stopped already. We ignore that checkMaxConnectionsTimer.run call.");
|
log.debug("We have stopped already. We ignore that checkMaxConnectionsTimer.run call.");
|
||||||
}
|
}
|
||||||
|
@ -252,13 +257,13 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkMaxConnections(int limit) {
|
private boolean checkMaxConnections() {
|
||||||
Log.traceCall("limit=" + limit);
|
Log.traceCall("maxConnections=" + maxConnections);
|
||||||
Set<Connection> allConnections = networkNode.getAllConnections();
|
Set<Connection> allConnections = networkNode.getAllConnections();
|
||||||
int size = allConnections.size();
|
int size = allConnections.size();
|
||||||
log.debug("We have {} connections open. Our limit is {}", size, limit);
|
log.debug("We have {} connections open. Our limit is {}", size, maxConnections);
|
||||||
|
|
||||||
if (size > limit) {
|
if (size > maxConnections) {
|
||||||
log.debug("We have too many connections open.\n\t" +
|
log.debug("We have too many connections open.\n\t" +
|
||||||
"Lets try first to remove the inbound connections of type PEER.");
|
"Lets try first to remove the inbound connections of type PEER.");
|
||||||
List<Connection> candidates = allConnections.stream()
|
List<Connection> candidates = allConnections.stream()
|
||||||
|
@ -266,7 +271,7 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
.filter(e -> e.getPeerType() == Connection.PeerType.PEER)
|
.filter(e -> e.getPeerType() == Connection.PeerType.PEER)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (candidates.size() == 0) {
|
if (candidates.isEmpty()) {
|
||||||
log.debug("No candidates found. We check if we exceed our " +
|
log.debug("No candidates found. We check if we exceed our " +
|
||||||
"maxConnectionsPeer limit of {}", maxConnectionsPeer);
|
"maxConnectionsPeer limit of {}", maxConnectionsPeer);
|
||||||
if (size > maxConnectionsPeer) {
|
if (size > maxConnectionsPeer) {
|
||||||
|
@ -275,7 +280,7 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
.filter(e -> e.getPeerType() == Connection.PeerType.PEER)
|
.filter(e -> e.getPeerType() == Connection.PeerType.PEER)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (candidates.size() == 0) {
|
if (candidates.isEmpty()) {
|
||||||
log.debug("No candidates found. We check if we exceed our " +
|
log.debug("No candidates found. We check if we exceed our " +
|
||||||
"maxConnectionsNonDirect limit of {}", maxConnectionsNonDirect);
|
"maxConnectionsNonDirect limit of {}", maxConnectionsNonDirect);
|
||||||
if (size > maxConnectionsNonDirect) {
|
if (size > maxConnectionsNonDirect) {
|
||||||
|
@ -284,7 +289,7 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
.filter(e -> e.getPeerType() != Connection.PeerType.DIRECT_MSG_PEER && e.getPeerType() != Connection.PeerType.INITIAL_DATA_REQUEST)
|
.filter(e -> e.getPeerType() != Connection.PeerType.DIRECT_MSG_PEER && e.getPeerType() != Connection.PeerType.INITIAL_DATA_REQUEST)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (candidates.size() == 0) {
|
if (candidates.isEmpty()) {
|
||||||
log.debug("No candidates found. We check if we exceed our " +
|
log.debug("No candidates found. We check if we exceed our " +
|
||||||
"maxConnectionsAbsolute limit of {}", maxConnectionsAbsolute);
|
"maxConnectionsAbsolute limit of {}", maxConnectionsAbsolute);
|
||||||
if (size > maxConnectionsAbsolute) {
|
if (size > maxConnectionsAbsolute) {
|
||||||
|
@ -297,13 +302,13 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (candidates.size() > 0) {
|
if (!candidates.isEmpty()) {
|
||||||
candidates.sort((o1, o2) -> ((Long) o1.getStatistic().getLastActivityTimestamp()).compareTo(((Long) o2.getStatistic().getLastActivityTimestamp())));
|
candidates.sort((o1, o2) -> ((Long) o1.getStatistic().getLastActivityTimestamp()).compareTo(((Long) o2.getStatistic().getLastActivityTimestamp())));
|
||||||
log.debug("Candidates.size() for shut down=" + candidates.size());
|
log.debug("Candidates.size() for shut down=" + candidates.size());
|
||||||
Connection connection = candidates.remove(0);
|
Connection connection = candidates.remove(0);
|
||||||
log.debug("We are going to shut down the oldest connection.\n\tconnection=" + connection.toString());
|
log.debug("We are going to shut down the oldest connection.\n\tconnection=" + connection.toString());
|
||||||
if (!connection.isStopped())
|
if (!connection.isStopped())
|
||||||
connection.shutDown(CloseConnectionReason.TOO_MANY_CONNECTIONS_OPEN, () -> checkMaxConnections(limit));
|
connection.shutDown(CloseConnectionReason.TOO_MANY_CONNECTIONS_OPEN, () -> UserThread.runAfter(this::checkMaxConnections, 100, TimeUnit.MILLISECONDS));
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
log.warn("No candidates found to remove (That case should not be possible as we use in the " +
|
log.warn("No candidates found to remove (That case should not be possible as we use in the " +
|
||||||
|
@ -322,7 +327,9 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
networkNode.getAllConnections().stream()
|
networkNode.getAllConnections().stream()
|
||||||
.filter(connection -> !connection.hasPeersNodeAddress())
|
.filter(connection -> !connection.hasPeersNodeAddress())
|
||||||
.forEach(connection -> UserThread.runAfter(() -> {
|
.forEach(connection -> UserThread.runAfter(() -> {
|
||||||
// We give 30 seconds delay and check again if still no address is set
|
// We give 240 seconds delay and check again if still no address is set
|
||||||
|
// Keep the delay long as we don't want to disconnect a peer in case we are a seed node just
|
||||||
|
// because he needs longer for the HS publishing
|
||||||
if (!connection.hasPeersNodeAddress() && !connection.isStopped()) {
|
if (!connection.hasPeersNodeAddress() && !connection.isStopped()) {
|
||||||
log.debug("We close the connection as the peer address is still unknown.\n\t" +
|
log.debug("We close the connection as the peer address is still unknown.\n\t" +
|
||||||
"connection=" + connection);
|
"connection=" + connection);
|
||||||
|
@ -333,20 +340,18 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
|
|
||||||
private void removeSuperfluousSeedNodes() {
|
private void removeSuperfluousSeedNodes() {
|
||||||
Log.traceCall();
|
Log.traceCall();
|
||||||
if (networkNode.getConfirmedConnections().size() > maxConnections) {
|
if (networkNode.getConfirmedConnections().size() > disconnectFromSeedNode) {
|
||||||
Set<Connection> connections = networkNode.getConfirmedConnections();
|
List<Connection> seedNodes = networkNode.getConfirmedConnections().stream()
|
||||||
if (hasSufficientConnections()) {
|
|
||||||
List<Connection> candidates = connections.stream()
|
|
||||||
.filter(this::isSeedNode)
|
.filter(this::isSeedNode)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (candidates.size() > 1) {
|
if (!seedNodes.isEmpty()) {
|
||||||
candidates.sort((o1, o2) -> ((Long) o1.getStatistic().getLastActivityTimestamp()).compareTo(((Long) o2.getStatistic().getLastActivityTimestamp())));
|
seedNodes.sort((o1, o2) -> ((Long) o1.getStatistic().getLastActivityTimestamp()).compareTo(((Long) o2.getStatistic().getLastActivityTimestamp())));
|
||||||
log.debug("Number of connections exceeding MAX_CONNECTIONS_EXTENDED_1. Current size=" + candidates.size());
|
log.debug("Number of seed node connections to disconnect. Current size=" + seedNodes.size());
|
||||||
Connection connection = candidates.remove(0);
|
Connection connection = seedNodes.get(0);
|
||||||
log.debug("We are going to shut down the oldest connection.\n\tconnection=" + connection.toString());
|
log.debug("We are going to shut down the oldest connection.\n\tconnection=" + connection.toString());
|
||||||
connection.shutDown(CloseConnectionReason.TOO_MANY_SEED_NODES_CONNECTED, this::removeSuperfluousSeedNodes);
|
connection.shutDown(CloseConnectionReason.TOO_MANY_SEED_NODES_CONNECTED,
|
||||||
}
|
() -> UserThread.runAfter(this::removeSuperfluousSeedNodes, 200, TimeUnit.MILLISECONDS));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -443,7 +448,7 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||||
result.append("\n------------------------------------------------------------\n");
|
result.append("\n------------------------------------------------------------\n");
|
||||||
log.debug(result.toString());
|
log.debug(result.toString());
|
||||||
}
|
}
|
||||||
log.debug("Number of collected reported peers: {}", reportedPeers.size());
|
log.info("Number of reported peers: {}", reportedPeers.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,8 @@ import io.bisq.network.p2p.storage.payload.CapabilityRequiringPayload;
|
||||||
import io.bisq.network.p2p.storage.payload.PersistableNetworkPayload;
|
import io.bisq.network.p2p.storage.payload.PersistableNetworkPayload;
|
||||||
import io.bisq.network.p2p.storage.payload.ProtectedStorageEntry;
|
import io.bisq.network.p2p.storage.payload.ProtectedStorageEntry;
|
||||||
import io.bisq.network.p2p.storage.payload.ProtectedStoragePayload;
|
import io.bisq.network.p2p.storage.payload.ProtectedStoragePayload;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -29,11 +28,9 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@Slf4j
|
||||||
public class GetDataRequestHandler {
|
public class GetDataRequestHandler {
|
||||||
private static final Logger log = LoggerFactory.getLogger(GetDataRequestHandler.class);
|
private static final long TIMEOUT = 60;
|
||||||
|
|
||||||
private static final long TIMEOUT = 120;
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -195,7 +192,7 @@ public class GetDataRequestHandler {
|
||||||
|
|
||||||
private void handleFault(String errorMessage, CloseConnectionReason closeConnectionReason, Connection connection) {
|
private void handleFault(String errorMessage, CloseConnectionReason closeConnectionReason, Connection connection) {
|
||||||
if (!stopped) {
|
if (!stopped) {
|
||||||
log.debug(errorMessage + "\n\tcloseConnectionReason=" + closeConnectionReason);
|
log.info(errorMessage + "\n\tcloseConnectionReason=" + closeConnectionReason);
|
||||||
cleanup();
|
cleanup();
|
||||||
listener.onFault(errorMessage, connection);
|
listener.onFault(errorMessage, connection);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -35,7 +35,7 @@ import static com.google.common.base.Preconditions.checkArgument;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class RequestDataHandler implements MessageListener {
|
class RequestDataHandler implements MessageListener {
|
||||||
private static final long TIMEOUT = 120;
|
private static final long TIMEOUT = 60;
|
||||||
private NodeAddress peersNodeAddress;
|
private NodeAddress peersNodeAddress;
|
||||||
|
|
||||||
|
|
||||||
|
@ -142,7 +142,6 @@ class RequestDataHandler implements MessageListener {
|
||||||
" failed. That is expected if the peer is offline.\n\t" +
|
" failed. That is expected if the peer is offline.\n\t" +
|
||||||
"getDataRequest=" + getDataRequest + "." +
|
"getDataRequest=" + getDataRequest + "." +
|
||||||
"\n\tException=" + throwable.getMessage();
|
"\n\tException=" + throwable.getMessage();
|
||||||
log.debug(errorMessage);
|
|
||||||
handleFault(errorMessage, nodeAddress, CloseConnectionReason.SEND_MSG_FAILURE);
|
handleFault(errorMessage, nodeAddress, CloseConnectionReason.SEND_MSG_FAILURE);
|
||||||
} else {
|
} else {
|
||||||
log.trace("We have stopped already. We ignore that networkNode.sendMessage.onFailure call. " +
|
log.trace("We have stopped already. We ignore that networkNode.sendMessage.onFailure call. " +
|
||||||
|
@ -299,6 +298,7 @@ class RequestDataHandler implements MessageListener {
|
||||||
@SuppressWarnings("UnusedParameters")
|
@SuppressWarnings("UnusedParameters")
|
||||||
private void handleFault(String errorMessage, NodeAddress nodeAddress, CloseConnectionReason closeConnectionReason) {
|
private void handleFault(String errorMessage, NodeAddress nodeAddress, CloseConnectionReason closeConnectionReason) {
|
||||||
cleanup();
|
cleanup();
|
||||||
|
log.info(errorMessage);
|
||||||
//peerManager.shutDownConnection(nodeAddress, closeConnectionReason);
|
//peerManager.shutDownConnection(nodeAddress, closeConnectionReason);
|
||||||
peerManager.handleConnectionFault(nodeAddress);
|
peerManager.handleConnectionFault(nodeAddress);
|
||||||
listener.onFault(errorMessage, null);
|
listener.onFault(errorMessage, null);
|
||||||
|
|
|
@ -11,9 +11,8 @@ import io.bisq.network.p2p.peers.getdata.messages.GetDataRequest;
|
||||||
import io.bisq.network.p2p.peers.peerexchange.Peer;
|
import io.bisq.network.p2p.peers.peerexchange.Peer;
|
||||||
import io.bisq.network.p2p.seed.SeedNodesRepository;
|
import io.bisq.network.p2p.seed.SeedNodesRepository;
|
||||||
import io.bisq.network.p2p.storage.P2PDataStorage;
|
import io.bisq.network.p2p.storage.P2PDataStorage;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -21,9 +20,8 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkArgument;
|
import static com.google.common.base.Preconditions.checkArgument;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
public class RequestDataManager implements MessageListener, ConnectionListener, PeerManager.Listener {
|
public class RequestDataManager implements MessageListener, ConnectionListener, PeerManager.Listener {
|
||||||
private static final Logger log = LoggerFactory.getLogger(RequestDataManager.class);
|
|
||||||
|
|
||||||
private static final long RETRY_DELAY_SEC = 10;
|
private static final long RETRY_DELAY_SEC = 10;
|
||||||
private static final long CLEANUP_TIMER = 120;
|
private static final long CLEANUP_TIMER = 120;
|
||||||
private boolean isPreliminaryDataRequest = true;
|
private boolean isPreliminaryDataRequest = true;
|
||||||
|
|
|
@ -101,9 +101,9 @@ class KeepAliveHandler implements MessageListener {
|
||||||
String errorMessage = "Sending ping to " + connection +
|
String errorMessage = "Sending ping to " + connection +
|
||||||
" failed. That is expected if the peer is offline.\n\tping=" + ping +
|
" failed. That is expected if the peer is offline.\n\tping=" + ping +
|
||||||
".\n\tException=" + throwable.getMessage();
|
".\n\tException=" + throwable.getMessage();
|
||||||
log.debug(errorMessage);
|
|
||||||
cleanup();
|
cleanup();
|
||||||
//peerManager.shutDownConnection(connection, CloseConnectionReason.SEND_MSG_FAILURE);
|
//peerManager.shutDownConnection(connection, CloseConnectionReason.SEND_MSG_FAILURE);
|
||||||
|
log.info(errorMessage);
|
||||||
peerManager.handleConnectionFault(connection);
|
peerManager.handleConnectionFault(connection);
|
||||||
listener.onFault(errorMessage);
|
listener.onFault(errorMessage);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -95,9 +95,9 @@ public class KeepAliveManager implements MessageListener, ConnectionListener, Pe
|
||||||
public void onFailure(@NotNull Throwable throwable) {
|
public void onFailure(@NotNull Throwable throwable) {
|
||||||
if (!stopped) {
|
if (!stopped) {
|
||||||
String errorMessage = "Sending pong to " + connection +
|
String errorMessage = "Sending pong to " + connection +
|
||||||
" failed. That is expected if the peer is offline. pong=" + pong + "." +
|
" failed. That is expected if the peer is offline. "+
|
||||||
"Exception: " + throwable.getMessage();
|
"Exception: " + throwable.getMessage();
|
||||||
log.debug(errorMessage);
|
log.info(errorMessage);
|
||||||
peerManager.handleConnectionFault(connection);
|
peerManager.handleConnectionFault(connection);
|
||||||
} else {
|
} else {
|
||||||
log.warn("We have stopped already. We ignore that networkNode.sendMessage.onFailure call.");
|
log.warn("We have stopped already. We ignore that networkNode.sendMessage.onFailure call.");
|
||||||
|
|
|
@ -21,7 +21,8 @@ import static com.google.common.base.Preconditions.checkArgument;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class GetPeersRequestHandler {
|
class GetPeersRequestHandler {
|
||||||
private static final long TIMEOUT = 120;
|
// We want to keep timeout short here
|
||||||
|
private static final long TIMEOUT = 40;
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -103,7 +104,7 @@ class GetPeersRequestHandler {
|
||||||
String errorMessage = "Sending getPeersResponse to " + connection +
|
String errorMessage = "Sending getPeersResponse to " + connection +
|
||||||
" failed. That is expected if the peer is offline. getPeersResponse=" + getPeersResponse + "." +
|
" failed. That is expected if the peer is offline. getPeersResponse=" + getPeersResponse + "." +
|
||||||
"Exception: " + throwable.getMessage();
|
"Exception: " + throwable.getMessage();
|
||||||
log.debug(errorMessage);
|
log.info(errorMessage);
|
||||||
handleFault(errorMessage, CloseConnectionReason.SEND_MSG_FAILURE, connection);
|
handleFault(errorMessage, CloseConnectionReason.SEND_MSG_FAILURE, connection);
|
||||||
} else {
|
} else {
|
||||||
log.trace("We have stopped already. We ignore that networkNode.sendMessage.onFailure call.");
|
log.trace("We have stopped already. We ignore that networkNode.sendMessage.onFailure call.");
|
||||||
|
|
|
@ -21,10 +21,12 @@ import org.jetbrains.annotations.NotNull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class PeerExchangeHandler implements MessageListener {
|
class PeerExchangeHandler implements MessageListener {
|
||||||
private static final long TIMEOUT = 120;
|
// We want to keep timeout short here
|
||||||
private static final int DELAY_MS = 1000;
|
private static final long TIMEOUT = 40;
|
||||||
|
private static final int DELAY_MS = 500;
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -79,17 +81,14 @@ class PeerExchangeHandler implements MessageListener {
|
||||||
|
|
||||||
private void sendGetPeersRequest(NodeAddress nodeAddress) {
|
private void sendGetPeersRequest(NodeAddress nodeAddress) {
|
||||||
Log.traceCall("nodeAddress=" + nodeAddress + " / this=" + this);
|
Log.traceCall("nodeAddress=" + nodeAddress + " / this=" + this);
|
||||||
|
log.info("sendGetPeersRequest to nodeAddress={}", nodeAddress);
|
||||||
if (!stopped) {
|
if (!stopped) {
|
||||||
if (networkNode.getNodeAddress() != null) {
|
if (networkNode.getNodeAddress() != null) {
|
||||||
GetPeersRequest getPeersRequest = new GetPeersRequest(networkNode.getNodeAddress(), nonce, peerManager.getConnectedNonSeedNodeReportedPeers(nodeAddress));
|
GetPeersRequest getPeersRequest = new GetPeersRequest(networkNode.getNodeAddress(), nonce, peerManager.getConnectedNonSeedNodeReportedPeers(nodeAddress));
|
||||||
|
|
||||||
if (timeoutTimer == null) {
|
if (timeoutTimer == null) {
|
||||||
timeoutTimer = UserThread.runAfter(() -> { // setup before sending to avoid race conditions
|
timeoutTimer = UserThread.runAfter(() -> { // setup before sending to avoid race conditions
|
||||||
if (!stopped) {
|
if (!stopped) {
|
||||||
String errorMessage = "A timeout occurred at sending getPeersRequest:" + getPeersRequest + " for nodeAddress:" + nodeAddress;
|
String errorMessage = "A timeout occurred at sending getPeersRequest. nodeAddress=" + nodeAddress;
|
||||||
log.debug(errorMessage + " / PeerExchangeHandler=" +
|
|
||||||
PeerExchangeHandler.this);
|
|
||||||
log.debug("timeoutTimer called on " + this);
|
|
||||||
handleFault(errorMessage, CloseConnectionReason.SEND_MSG_TIMEOUT, nodeAddress);
|
handleFault(errorMessage, CloseConnectionReason.SEND_MSG_TIMEOUT, nodeAddress);
|
||||||
} else {
|
} else {
|
||||||
log.trace("We have stopped that handler already. We ignore that timeoutTimer.run call.");
|
log.trace("We have stopped that handler already. We ignore that timeoutTimer.run call.");
|
||||||
|
@ -121,9 +120,7 @@ class PeerExchangeHandler implements MessageListener {
|
||||||
public void onFailure(@NotNull Throwable throwable) {
|
public void onFailure(@NotNull Throwable throwable) {
|
||||||
if (!stopped) {
|
if (!stopped) {
|
||||||
String errorMessage = "Sending getPeersRequest to " + nodeAddress +
|
String errorMessage = "Sending getPeersRequest to " + nodeAddress +
|
||||||
" failed. That is expected if the peer is offline.\n\tgetPeersRequest=" + getPeersRequest +
|
" failed. That is expected if the peer is offline. Exception=" + throwable.getMessage();
|
||||||
".\n\tException=" + throwable.getMessage();
|
|
||||||
log.debug(errorMessage);
|
|
||||||
handleFault(errorMessage, CloseConnectionReason.SEND_MSG_FAILURE, nodeAddress);
|
handleFault(errorMessage, CloseConnectionReason.SEND_MSG_FAILURE, nodeAddress);
|
||||||
} else {
|
} else {
|
||||||
log.trace("We have stopped that handler already. We ignore that sendGetPeersRequest.onFailure call.");
|
log.trace("We have stopped that handler already. We ignore that sendGetPeersRequest.onFailure call.");
|
||||||
|
|
|
@ -10,8 +10,7 @@ import io.bisq.network.p2p.network.*;
|
||||||
import io.bisq.network.p2p.peers.PeerManager;
|
import io.bisq.network.p2p.peers.PeerManager;
|
||||||
import io.bisq.network.p2p.peers.peerexchange.messages.GetPeersRequest;
|
import io.bisq.network.p2p.peers.peerexchange.messages.GetPeersRequest;
|
||||||
import io.bisq.network.p2p.seed.SeedNodesRepository;
|
import io.bisq.network.p2p.seed.SeedNodesRepository;
|
||||||
import org.slf4j.Logger;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
@ -19,12 +18,11 @@ import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
public class PeerExchangeManager implements MessageListener, ConnectionListener, PeerManager.Listener {
|
public class PeerExchangeManager implements MessageListener, ConnectionListener, PeerManager.Listener {
|
||||||
private static final Logger log = LoggerFactory.getLogger(PeerExchangeManager.class);
|
|
||||||
|
|
||||||
private static final long RETRY_DELAY_SEC = 10;
|
private static final long RETRY_DELAY_SEC = 10;
|
||||||
private static final long RETRY_DELAY_AFTER_ALL_CON_LOST_SEC = 3;
|
private static final long RETRY_DELAY_AFTER_ALL_CON_LOST_SEC = 3;
|
||||||
private static final long REQUEST_PERIODICALLY_INTERVAL_SEC = 10 * 60;
|
private static final long REQUEST_PERIODICALLY_INTERVAL_MIN = 10;
|
||||||
|
|
||||||
private final NetworkNode networkNode;
|
private final NetworkNode networkNode;
|
||||||
private final PeerManager peerManager;
|
private final PeerManager peerManager;
|
||||||
|
@ -81,6 +79,19 @@ public class PeerExchangeManager implements MessageListener, ConnectionListener,
|
||||||
startPeriodicTimer();
|
startPeriodicTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void initialRequestPeersFromReportedOrPersistedPeers() {
|
||||||
|
if (!peerManager.getReportedPeers().isEmpty() || !peerManager.getPersistedPeers().isEmpty()) {
|
||||||
|
// We will likely get more connections as the GetPeersResponse onComplete handler triggers a new request if the confirmed
|
||||||
|
// connections have not reached the min connection target.
|
||||||
|
// So we potentially request 2 times 8 but we prefer to get fast connected
|
||||||
|
// and disconnect afterwards when we exceed max connections rather to delay connection in case many of our peers from the list are dead.
|
||||||
|
for (int i = 0; i < Math.min(8, peerManager.getMaxConnections()); i++)
|
||||||
|
requestWithAvailablePeers();
|
||||||
|
} else {
|
||||||
|
log.info("We don't have any reported or persisted peers, so we need to wait until we receive from the seed node the initial peer list.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// ConnectionListener implementation
|
// ConnectionListener implementation
|
||||||
|
@ -193,14 +204,13 @@ public class PeerExchangeManager implements MessageListener, ConnectionListener,
|
||||||
new PeerExchangeHandler.Listener() {
|
new PeerExchangeHandler.Listener() {
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
log.trace("PeerExchangeHandshake of outbound connection complete. nodeAddress={}", nodeAddress);
|
|
||||||
handlerMap.remove(nodeAddress);
|
handlerMap.remove(nodeAddress);
|
||||||
requestWithAvailablePeers();
|
requestWithAvailablePeers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFault(String errorMessage, @Nullable Connection connection) {
|
public void onFault(String errorMessage, @Nullable Connection connection) {
|
||||||
log.trace("PeerExchangeHandshake of outbound connection failed.\n\terrorMessage={}\n\t" +
|
log.info("PeerExchangeHandshake of outbound connection failed.\n\terrorMessage={}\n\t" +
|
||||||
"nodeAddress={}", errorMessage, nodeAddress);
|
"nodeAddress={}", errorMessage, nodeAddress);
|
||||||
|
|
||||||
peerManager.handleConnectionFault(nodeAddress);
|
peerManager.handleConnectionFault(nodeAddress);
|
||||||
|
@ -302,7 +312,7 @@ public class PeerExchangeManager implements MessageListener, ConnectionListener,
|
||||||
stopped = false;
|
stopped = false;
|
||||||
if (periodicTimer == null)
|
if (periodicTimer == null)
|
||||||
periodicTimer = UserThread.runPeriodically(this::requestWithAvailablePeers,
|
periodicTimer = UserThread.runPeriodically(this::requestWithAvailablePeers,
|
||||||
REQUEST_PERIODICALLY_INTERVAL_SEC, TimeUnit.SECONDS);
|
REQUEST_PERIODICALLY_INTERVAL_MIN, TimeUnit.MINUTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void restart() {
|
private void restart() {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 9.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 37 KiB |
|
@ -1,74 +0,0 @@
|
||||||
;This file will be executed next to the application bundle image
|
|
||||||
;I.e. current directory will contain folder Bisq with application files
|
|
||||||
[Setup]
|
|
||||||
AppId={{bisq}}
|
|
||||||
AppName=Bisq
|
|
||||||
AppVersion=0.6.2
|
|
||||||
AppVerName=Bisq
|
|
||||||
AppPublisher=Bisq
|
|
||||||
AppComments=Bisq
|
|
||||||
AppCopyright=Copyright (C) 2016
|
|
||||||
AppPublisherURL=https://bisq.network
|
|
||||||
AppSupportURL=https://bisq.network
|
|
||||||
;AppUpdatesURL=http://java.com/
|
|
||||||
DefaultDirName={localappdata}\Bisq
|
|
||||||
DisableStartupPrompt=Yes
|
|
||||||
DisableDirPage=Yes
|
|
||||||
DisableProgramGroupPage=Yes
|
|
||||||
DisableReadyPage=Yes
|
|
||||||
DisableFinishedPage=Yes
|
|
||||||
DisableWelcomePage=Yes
|
|
||||||
DefaultGroupName=Bisq
|
|
||||||
;Optional License
|
|
||||||
LicenseFile=
|
|
||||||
;WinXP or above
|
|
||||||
MinVersion=0,5.1
|
|
||||||
OutputBaseFilename=Bisq
|
|
||||||
Compression=lzma
|
|
||||||
SolidCompression=yes
|
|
||||||
PrivilegesRequired=lowest
|
|
||||||
SetupIconFile=C:\Users\asd\Desktop\exchange\package\win\64bit\Bisq.ico
|
|
||||||
UninstallDisplayIcon={app}\Bisq.ico
|
|
||||||
UninstallDisplayName=Bisq
|
|
||||||
WizardImageStretch=No
|
|
||||||
WizardSmallImageFile=Bisq-setup-icon.bmp
|
|
||||||
ArchitecturesInstallIn64BitMode=x64
|
|
||||||
ChangesAssociations=Yes
|
|
||||||
|
|
||||||
[Languages]
|
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
|
||||||
|
|
||||||
[Files]
|
|
||||||
Source: "Bisq\Bisq.exe"; DestDir: "{app}"; Flags: ignoreversion
|
|
||||||
Source: "Bisq\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
||||||
|
|
||||||
[Icons]
|
|
||||||
Name: "{group}\Bisq"; Filename: "{app}\Bisq.exe"; IconFilename: "{app}\Bisq.ico"; Check: returnTrue()
|
|
||||||
Name: "{commondesktop}\Bisq"; Filename: "{app}\Bisq.exe"; IconFilename: "{app}\Bisq.ico"; Check: returnFalse()
|
|
||||||
|
|
||||||
[Run]
|
|
||||||
Filename: "{app}\Bisq.exe"; Description: "{cm:LaunchProgram,Bisq}"; Flags: nowait postinstall skipifsilent; Check: returnTrue()
|
|
||||||
Filename: "{app}\Bisq.exe"; Parameters: "-install -svcName ""Bisq"" -svcDesc ""Bisq"" -mainExe ""Bisq.exe"" "; Check: returnFalse()
|
|
||||||
|
|
||||||
[UninstallRun]
|
|
||||||
Filename: "{app}\Bisq.exe "; Parameters: "-uninstall -svcName Bisq -stopOnUninstall"; Check: returnFalse()
|
|
||||||
|
|
||||||
[Code]
|
|
||||||
function returnTrue(): Boolean;
|
|
||||||
begin
|
|
||||||
Result := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function returnFalse(): Boolean;
|
|
||||||
begin
|
|
||||||
Result := False;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function InitializeSetup(): Boolean;
|
|
||||||
begin
|
|
||||||
// Possible future improvements:
|
|
||||||
// if version less or same => just launch app
|
|
||||||
// if upgrade => check if same app is running and wait for it to exit
|
|
||||||
// Add pack200/unpack200 support?
|
|
||||||
Result := True;
|
|
||||||
end;
|
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
@ -27,9 +27,9 @@ OutputBaseFilename=Bisq
|
||||||
Compression=lzma
|
Compression=lzma
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
PrivilegesRequired=lowest
|
PrivilegesRequired=lowest
|
||||||
SetupIconFile=C:\Users\mk\Desktop\exchange\package\win\32bit\Bisq.ico
|
SetupIconFile=Bisq\Bisq.ico
|
||||||
UninstallDisplayIcon={app}\Bisq.ico
|
UninstallDisplayIcon={app}\Bisq.ico
|
||||||
UninstallDisplayName=Bisq
|
UninstallDisplayName=Bisq
|
||||||
WizardImageStretch=No
|
WizardImageStretch=No
|
||||||
WizardSmallImageFile=Bisq-setup-icon.bmp
|
WizardSmallImageFile=Bisq-setup-icon.bmp
|
||||||
ArchitecturesInstallIn64BitMode=x64
|
ArchitecturesInstallIn64BitMode=x64
|
|
@ -86,13 +86,12 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>2.3</version>
|
<version>3.1.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- broken with Java 8 (MSHADE-174), using ProGuard instead. -->
|
<!-- broken with Java 8 (MSHADE-174), using ProGuard instead. -->
|
||||||
<minimizeJar>false</minimizeJar>
|
<minimizeJar>false</minimizeJar>
|
||||||
<transformers>
|
<transformers>
|
||||||
<transformer
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Main-Class>io.bisq.provider.ProviderMain</Main-Class>
|
<Main-Class>io.bisq.provider.ProviderMain</Main-Class>
|
||||||
<!-- the specified bouncy castle jar classes -->
|
<!-- the specified bouncy castle jar classes -->
|
||||||
|
|
|
@ -18,5 +18,5 @@
|
||||||
package io.bisq.provider;
|
package io.bisq.provider;
|
||||||
|
|
||||||
public class ProviderVersion {
|
public class ProviderVersion {
|
||||||
public static final String VERSION = "0.6.3";
|
public static final String VERSION = "0.6.4";
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,13 +86,12 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>2.3</version>
|
<version>3.1.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- broken with Java 8 (MSHADE-174), using ProGuard instead. -->
|
<!-- broken with Java 8 (MSHADE-174), using ProGuard instead. -->
|
||||||
<minimizeJar>false</minimizeJar>
|
<minimizeJar>false</minimizeJar>
|
||||||
<transformers>
|
<transformers>
|
||||||
<transformer
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Main-Class>io.bisq.seednode.SeedNodeMain</Main-Class>
|
<Main-Class>io.bisq.seednode.SeedNodeMain</Main-Class>
|
||||||
<!-- the specified bouncy castle jar classes -->
|
<!-- the specified bouncy castle jar classes -->
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.Arrays;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SeedNode {
|
public class SeedNode {
|
||||||
public static final String VERSION = "0.6.2";
|
public static final String VERSION = "0.6.3";
|
||||||
|
|
||||||
private static BisqEnvironment bisqEnvironment;
|
private static BisqEnvironment bisqEnvironment;
|
||||||
public static void setEnvironment(BisqEnvironment bisqEnvironment) {
|
public static void setEnvironment(BisqEnvironment bisqEnvironment) {
|
||||||
|
|
|
@ -85,13 +85,12 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>2.3</version>
|
<version>3.1.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- broken with Java 8 (MSHADE-174), using ProGuard instead. -->
|
<!-- broken with Java 8 (MSHADE-174), using ProGuard instead. -->
|
||||||
<minimizeJar>false</minimizeJar>
|
<minimizeJar>false</minimizeJar>
|
||||||
<transformers>
|
<transformers>
|
||||||
<transformer
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Main-Class>io.bisq.statistics.StatisticsMain</Main-Class>
|
<Main-Class>io.bisq.statistics.StatisticsMain</Main-Class>
|
||||||
<!-- the specified bouncy castle jar classes -->
|
<!-- the specified bouncy castle jar classes -->
|
||||||
|
|
|
@ -41,8 +41,7 @@ import java.util.Arrays;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class Statistics {
|
public class Statistics {
|
||||||
// Bisq v0.6.1 did not change anything relevant for that project so we stick with 0.6.0
|
public static final String VERSION = "0.6.1";
|
||||||
public static final String VERSION = "0.6.0";
|
|
||||||
|
|
||||||
private static BisqEnvironment bisqEnvironment;
|
private static BisqEnvironment bisqEnvironment;
|
||||||
public static void setEnvironment(BisqEnvironment bisqEnvironment) {
|
public static void setEnvironment(BisqEnvironment bisqEnvironment) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue