mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +01:00
Cleanup formatting, organize imports
This commit is contained in:
parent
9a72532538
commit
3ea9ad4712
28 changed files with 80 additions and 84 deletions
|
@ -1,30 +1,25 @@
|
|||
|
||||
/**
|
||||
* Copyright (C) 2010-2014 Leon Blakey <lord.quackstar at gmail.com>
|
||||
*
|
||||
* <p>
|
||||
* This file is part of PircBotX.
|
||||
*
|
||||
* <p>
|
||||
* PircBotX is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* <p>
|
||||
* PircBotX is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* <p>
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* PircBotX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package io.bitsquare.btc;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Proxy;
|
||||
import java.net.Socket;
|
||||
import java.net.UnknownHostException;
|
||||
import javax.net.SocketFactory;
|
||||
import java.io.IOException;
|
||||
import java.net.*;
|
||||
|
||||
/**
|
||||
* A basic SocketFactory for creating sockets that connect through the specified
|
||||
|
@ -49,8 +44,8 @@ public class ProxySocketFactory extends SocketFactory {
|
|||
* and port.
|
||||
*
|
||||
* @param proxyType The type of proxy were connecting to
|
||||
* @param hostname The hostname of the proxy server
|
||||
* @param port The port of the proxy server
|
||||
* @param hostname The hostname of the proxy server
|
||||
* @param port The port of the proxy server
|
||||
*/
|
||||
public ProxySocketFactory(Proxy.Type proxyType, String hostname, int port) {
|
||||
this.proxy = new Proxy(proxyType, new InetSocketAddress(hostname, port));
|
||||
|
@ -60,8 +55,8 @@ public class ProxySocketFactory extends SocketFactory {
|
|||
public Socket createSocket() throws IOException {
|
||||
Socket socket = new Socket(proxy);
|
||||
return socket;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(String string, int i) throws IOException, UnknownHostException {
|
||||
Socket socket = new Socket(proxy);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/**
|
||||
* Copyright 2011 Micheal Swiggs
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -41,34 +41,34 @@ public class SeedPeersSocks5Dns implements PeerDiscovery {
|
|||
private int pnseedIndex;
|
||||
|
||||
private final InetSocketAddress[] seedAddrsResolved;
|
||||
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(SeedPeersSocks5Dns.class);
|
||||
|
||||
/**
|
||||
* Supports finding peers by hostname over a socks5 proxy.
|
||||
*
|
||||
* @param Socks5Proxy proxy the socks5 proxy to connect over.
|
||||
*
|
||||
* @param Socks5Proxy proxy the socks5 proxy to connect over.
|
||||
* @param NetworkParameters param to be used for seed and port information.
|
||||
*/
|
||||
public SeedPeersSocks5Dns(Socks5Proxy proxy, NetworkParameters params) {
|
||||
|
||||
this.proxy = proxy;
|
||||
this.params = params;
|
||||
this.seedAddrs = convertAddrsString( params.getDnsSeeds(), params.getPort() );
|
||||
this.seedAddrs = convertAddrsString(params.getDnsSeeds(), params.getPort());
|
||||
|
||||
if( false ) {
|
||||
if (false) {
|
||||
// This is an example of how .onion servers could be used. Unfortunately there is presently no way
|
||||
// to hand the onion address (or a connected socket) back to bitcoinj without it crashing in PeerAddress.
|
||||
// note: the onion addresses should be added into bitcoinj NetworkParameters classes, eg for mainnet, testnet
|
||||
// not here!
|
||||
this.seedAddrs = new InetSocketAddress[] { InetSocketAddress.createUnresolved( "cajrifqkvalh2ooa.onion", 8333 ),
|
||||
InetSocketAddress.createUnresolved( "bk7yp6epnmcllq72.onion", 8333 )
|
||||
this.seedAddrs = new InetSocketAddress[]{InetSocketAddress.createUnresolved("cajrifqkvalh2ooa.onion", 8333),
|
||||
InetSocketAddress.createUnresolved("bk7yp6epnmcllq72.onion", 8333)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
seedAddrsResolved = new InetSocketAddress[seedAddrs.length];
|
||||
for(int idx = seedAddrs.length; idx < seedAddrsResolved.length; idx ++) {
|
||||
seedAddrsResolved[idx] = seedAddrsIP[idx-seedAddrs.length];
|
||||
for (int idx = seedAddrs.length; idx < seedAddrsResolved.length; idx++) {
|
||||
seedAddrsResolved[idx] = seedAddrsIP[idx - seedAddrs.length];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,11 +100,11 @@ public class SeedPeersSocks5Dns implements PeerDiscovery {
|
|||
if (pnseedIndex >= seedAddrsResolved.length) {
|
||||
return null;
|
||||
}
|
||||
if( seedAddrsResolved[pnseedIndex] == null ) {
|
||||
seedAddrsResolved[pnseedIndex] = lookup( proxy, seedAddrs[pnseedIndex] );
|
||||
if (seedAddrsResolved[pnseedIndex] == null) {
|
||||
seedAddrsResolved[pnseedIndex] = lookup(proxy, seedAddrs[pnseedIndex]);
|
||||
}
|
||||
log.error("SeedPeersSocks5Dns::nextPeer: " + seedAddrsResolved[pnseedIndex]);
|
||||
|
||||
|
||||
return seedAddrsResolved[pnseedIndex++];
|
||||
}
|
||||
|
||||
|
@ -125,8 +125,8 @@ public class SeedPeersSocks5Dns implements PeerDiscovery {
|
|||
*/
|
||||
private InetSocketAddress[] allPeers() throws UnknownHostException {
|
||||
for (int i = 0; i < seedAddrsResolved.length; ++i) {
|
||||
if( seedAddrsResolved[i] == null ) {
|
||||
seedAddrsResolved[i] = lookup( proxy, seedAddrs[i] );
|
||||
if (seedAddrsResolved[i] == null) {
|
||||
seedAddrsResolved[i] = lookup(proxy, seedAddrs[i]);
|
||||
}
|
||||
}
|
||||
return seedAddrsResolved;
|
||||
|
@ -136,22 +136,21 @@ public class SeedPeersSocks5Dns implements PeerDiscovery {
|
|||
* Resolves a hostname via remote DNS over socks5 proxy.
|
||||
*/
|
||||
@Nullable
|
||||
public static InetSocketAddress lookup( Socks5Proxy proxy, InetSocketAddress addr ) {
|
||||
if( !addr.isUnresolved() ) {
|
||||
public static InetSocketAddress lookup(Socks5Proxy proxy, InetSocketAddress addr) {
|
||||
if (!addr.isUnresolved()) {
|
||||
return addr;
|
||||
}
|
||||
try {
|
||||
SocksSocket proxySocket = new SocksSocket( proxy, addr.getHostString(), addr.getPort() );
|
||||
SocksSocket proxySocket = new SocksSocket(proxy, addr.getHostString(), addr.getPort());
|
||||
InetAddress addrResolved = proxySocket.getInetAddress();
|
||||
proxySocket.close();
|
||||
if( addrResolved != null ) {
|
||||
if (addrResolved != null) {
|
||||
log.debug("Resolved " + addr.getHostString() + " to " + addrResolved.getHostAddress());
|
||||
return new InetSocketAddress(addrResolved, addr.getPort() );
|
||||
}
|
||||
else {
|
||||
return new InetSocketAddress(addrResolved, addr.getPort());
|
||||
} else {
|
||||
// note: .onion nodes fall in here when proxy is Tor. But they have no IP address.
|
||||
// Unfortunately bitcoinj crashes in PeerAddress if it finds an unresolved address.
|
||||
log.error("Connected to " + addr.getHostString() + ". But did not resolve to address." );
|
||||
log.error("Connected to " + addr.getHostString() + ". But did not resolve to address.");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("Error resolving " + addr.getHostString() + ". Exception:\n" + e.toString());
|
||||
|
@ -164,12 +163,12 @@ public class SeedPeersSocks5Dns implements PeerDiscovery {
|
|||
*/
|
||||
private InetSocketAddress[] convertAddrsString(String[] addrs, int port) {
|
||||
InetSocketAddress[] list = new InetSocketAddress[addrs.length];
|
||||
for( int i = 0; i < addrs.length; i++) {
|
||||
for (int i = 0; i < addrs.length; i++) {
|
||||
list[i] = InetSocketAddress.createUnresolved(addrs[i], port);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
}
|
||||
|
|
|
@ -67,8 +67,8 @@ public final class PaymentMethod implements Persistable, Comparable {
|
|||
public static PaymentMethod SWISH;
|
||||
public static PaymentMethod ALI_PAY;
|
||||
public static PaymentMethod CLEAR_X_CHANGE;
|
||||
public static PaymentMethod CHASE_QUICK_PAY;
|
||||
public static PaymentMethod INTERAC_E_TRANSFER;
|
||||
public static PaymentMethod CHASE_QUICK_PAY;
|
||||
public static PaymentMethod INTERAC_E_TRANSFER;
|
||||
public static PaymentMethod US_POSTAL_MONEY_ORDER;
|
||||
public static PaymentMethod CASH_DEPOSIT;
|
||||
public static PaymentMethod BLOCK_CHAINS;
|
||||
|
|
|
@ -43,7 +43,7 @@ public class PlaceOfferModel implements Model {
|
|||
|
||||
public PlaceOfferModel(Offer offer,
|
||||
Coin reservedFundsForOffer,
|
||||
boolean useSavingsWallet,
|
||||
boolean useSavingsWallet,
|
||||
WalletService walletService,
|
||||
TradeWalletService tradeWalletService,
|
||||
OfferBookService offerBookService,
|
||||
|
|
|
@ -63,8 +63,8 @@ public abstract class TradeProtocol {
|
|||
doHandleDecryptedMessage(tradeMessage, peersNodeAddress);
|
||||
}
|
||||
} //else {
|
||||
//TODO not clear anymore what case is handled here
|
||||
// it might be that we received a msg from the arbitrator, we don't handle that here but we don't want to log an error
|
||||
//TODO not clear anymore what case is handled here
|
||||
// it might be that we received a msg from the arbitrator, we don't handle that here but we don't want to log an error
|
||||
/*Optional<Arbitrator> arbitratorOptional = processModel.getArbitratorManager().getArbitratorsObservableMap().values().stream()
|
||||
.filter(e -> e.getArbitratorAddress().equals(trade.getArbitratorAddress())).findFirst();
|
||||
PubKeyRing arbitratorPubKeyRing = null;
|
||||
|
|
|
@ -61,7 +61,7 @@ public class ProcessDepositTxPublishedMessage extends TradeTask {
|
|||
removeMailboxMessageAfterProcessing();
|
||||
|
||||
trade.setState(Trade.State.OFFERER_RECEIVED_DEPOSIT_TX_PUBLISHED_MSG);
|
||||
|
||||
|
||||
complete();
|
||||
} catch (Throwable t) {
|
||||
failed(t);
|
||||
|
|
|
@ -52,7 +52,7 @@ public class ProcessFiatTransferStartedMessage extends TradeTask {
|
|||
removeMailboxMessageAfterProcessing();
|
||||
|
||||
trade.setState(Trade.State.SELLER_RECEIVED_FIAT_PAYMENT_INITIATED_MSG);
|
||||
|
||||
|
||||
complete();
|
||||
} catch (Throwable t) {
|
||||
failed(t);
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ProcessPayoutTxFinalizedMessage extends TradeTask {
|
|||
checkNotNull(message);
|
||||
checkArgument(message.payoutTx != null);
|
||||
trade.setPayoutTx(processModel.getTradeWalletService().addTransactionToWallet(message.payoutTx));
|
||||
|
||||
|
||||
|
||||
// update to the latest peer address of our peer if the message is correct
|
||||
trade.setTradingPeerNodeAddress(processModel.getTempTradingPeerNodeAddress());
|
||||
|
|
|
@ -81,7 +81,7 @@ public class TxIdTextField extends AnchorPane {
|
|||
AnchorPane.setRightAnchor(copyIcon, 30.0);
|
||||
|
||||
Tooltip tooltip = new Tooltip("Open a blockchain explorer with that transactions ID");
|
||||
|
||||
|
||||
blockExplorerIcon = new Label();
|
||||
blockExplorerIcon.getStyleClass().add("external-link-icon");
|
||||
blockExplorerIcon.setTooltip(tooltip);
|
||||
|
|
|
@ -224,8 +224,6 @@
|
|||
-fx-image: url("../../../images/invert.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
#avatar_1 {
|
||||
-fx-image: url("../../../images/avatars/avatar_1.png");
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public class FiatAccountsView extends ActivatableViewAndModel<GridPane, FiatAcco
|
|||
private final ChaseQuickPayValidator chaseQuickPayValidator;
|
||||
private final InteracETransferValidator interacETransferValidator;
|
||||
private final USPostalMoneyOrderValidator usPostalMoneyOrderValidator;
|
||||
|
||||
|
||||
private BSFormatter formatter;
|
||||
|
||||
private PaymentMethodForm paymentMethodForm;
|
||||
|
|
|
@ -267,7 +267,7 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
|||
private void doRestore() {
|
||||
long date = restoreDatePicker.getValue().atStartOfDay().toEpochSecond(ZoneOffset.UTC);
|
||||
DeterministicSeed seed = new DeterministicSeed(Splitter.on(" ").splitToList(restoreSeedWordsTextArea.getText()), null, "", date);
|
||||
walletService.restoreSeedWords(seed,
|
||||
walletService.restoreSeedWords(seed,
|
||||
() -> UserThread.execute(() -> {
|
||||
log.info("Wallet restored with seed words");
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ public class CandleTooltip extends GridPane {
|
|||
setHgap(Layout.GRID_GAP);
|
||||
|
||||
setVgap(2);
|
||||
|
||||
|
||||
Label open = new Label("Open:");
|
||||
Label close = new Label("Close:");
|
||||
Label high = new Label("High:");
|
||||
|
|
|
@ -120,7 +120,7 @@ public abstract class OfferView extends ActivatableView<TabPane, Void> {
|
|||
else {
|
||||
tradeCurrency = CurrencyUtil.getDefaultTradeCurrency();
|
||||
}
|
||||
|
||||
|
||||
root.getSelectionModel().selectedItemProperty().addListener(tabChangeListener);
|
||||
root.getTabs().addListener(tabListChangeListener);
|
||||
navigation.addListener(navigationListener);
|
||||
|
|
|
@ -137,7 +137,7 @@ public abstract class Overlay<T extends Overlay> {
|
|||
protected boolean hideCloseButton;
|
||||
protected boolean useAnimation = true;
|
||||
private String headlineStyle;
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Public API
|
||||
|
@ -357,7 +357,7 @@ public abstract class Overlay<T extends Overlay> {
|
|||
this.headlineStyle = headlineStyle;
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Protected
|
||||
|
@ -629,7 +629,7 @@ public abstract class Overlay<T extends Overlay> {
|
|||
|
||||
if (headlineStyle != null)
|
||||
headLineLabel.setStyle(headlineStyle);
|
||||
|
||||
|
||||
GridPane.setHalignment(headLineLabel, HPos.LEFT);
|
||||
GridPane.setRowIndex(headLineLabel, rowIndex);
|
||||
GridPane.setColumnSpan(headLineLabel, 2);
|
||||
|
|
|
@ -136,7 +136,7 @@ public class ContractWindow extends Overlay<ContractWindow> {
|
|||
BSResources.get(sellerPaymentAccountContractData.getPaymentDetails())).second.setMouseTransparent(false);
|
||||
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, "Selected arbitrator:", contract.arbitratorNodeAddress.getFullAddress());
|
||||
|
||||
|
||||
if (showAcceptedCountryCodes) {
|
||||
String countries;
|
||||
Tooltip tooltip = null;
|
||||
|
|
|
@ -77,7 +77,7 @@ public class FailedTradesView extends ActivatableViewAndModel<VBox, FailedTrades
|
|||
else
|
||||
return 0;
|
||||
});
|
||||
|
||||
|
||||
stateColumn.setComparator((o1, o2) -> model.getState(o1).compareTo(model.getState(o2)));
|
||||
marketColumn.setComparator((o1, o2) -> model.getMarketLabel(o1).compareTo(model.getMarketLabel(o2)));
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ public class BuyerStep4View extends TradeStepView {
|
|||
if (model.getLockTime() > 0)
|
||||
return "Wait until payout lock time is over";
|
||||
else
|
||||
return "Sending payout transaction to peer";
|
||||
return "Sending payout transaction to peer";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -124,7 +124,7 @@ public class Monitor {
|
|||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
gateway = new Gateway(offerBookService);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package io.bitsquare.http;
|
||||
|
||||
import org.apache.http.conn.DnsResolver;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
|
@ -10,6 +11,6 @@ class FakeDnsResolver implements DnsResolver {
|
|||
@Override
|
||||
public InetAddress[] resolve(String host) throws UnknownHostException {
|
||||
// Return some fake DNS record for every request, we won't be using it
|
||||
return new InetAddress[] { InetAddress.getByAddress(new byte[] { 1, 1, 1, 1 }) };
|
||||
return new InetAddress[]{InetAddress.getByAddress(new byte[]{1, 1, 1, 1})};
|
||||
}
|
||||
}
|
|
@ -1,19 +1,20 @@
|
|||
package io.bitsquare.http;
|
||||
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Proxy;
|
||||
import java.net.Socket;
|
||||
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
|
||||
// This class is adapted from
|
||||
// http://stackoverflow.com/a/25203021/5616248
|
||||
//
|
||||
// This class routes connections over Socks, and avoids resolving hostnames locally.
|
||||
class SocksConnectionSocketFactory extends PlainConnectionSocketFactory {
|
||||
|
||||
|
||||
/**
|
||||
* creates an unconnected Socks Proxy socket
|
||||
*/
|
||||
|
@ -29,7 +30,7 @@ class SocksConnectionSocketFactory extends PlainConnectionSocketFactory {
|
|||
*/
|
||||
@Override
|
||||
public Socket connectSocket(int connectTimeout, Socket socket, HttpHost host, InetSocketAddress remoteAddress,
|
||||
InetSocketAddress localAddress, HttpContext context) throws IOException {
|
||||
InetSocketAddress localAddress, HttpContext context) throws IOException {
|
||||
// Convert address to unresolved
|
||||
InetSocketAddress unresolvedRemote = InetSocketAddress
|
||||
.createUnresolved(host.getHostName(), remoteAddress.getPort());
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
package io.bitsquare.http;
|
||||
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Proxy;
|
||||
import java.net.Socket;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
|
||||
// This class is adapted from
|
||||
// http://stackoverflow.com/a/25203021/5616248
|
||||
|
@ -16,10 +17,10 @@ import org.apache.http.protocol.HttpContext;
|
|||
class SocksSSLConnectionSocketFactory extends SSLConnectionSocketFactory {
|
||||
|
||||
public SocksSSLConnectionSocketFactory(final SSLContext sslContext) {
|
||||
|
||||
|
||||
// Only allow connection's to site's with valid certs.
|
||||
super(sslContext, STRICT_HOSTNAME_VERIFIER);
|
||||
|
||||
|
||||
// Or to allow "insecure" (eg self-signed certs)
|
||||
// super(sslContext, ALLOW_ALL_HOSTNAME_VERIFIER);
|
||||
}
|
||||
|
@ -39,7 +40,7 @@ class SocksSSLConnectionSocketFactory extends SSLConnectionSocketFactory {
|
|||
*/
|
||||
@Override
|
||||
public Socket connectSocket(int connectTimeout, Socket socket, HttpHost host, InetSocketAddress remoteAddress,
|
||||
InetSocketAddress localAddress, HttpContext context) throws IOException {
|
||||
InetSocketAddress localAddress, HttpContext context) throws IOException {
|
||||
// Convert address to unresolved
|
||||
InetSocketAddress unresolvedRemote = InetSocketAddress
|
||||
.createUnresolved(host.getHostName(), remoteAddress.getPort());
|
||||
|
|
|
@ -80,7 +80,7 @@ public class LocalhostNetworkNode extends NetworkNode {
|
|||
protected Socket createSocket(NodeAddress peerNodeAddress) throws IOException {
|
||||
return new Socket(peerNodeAddress.hostName, peerNodeAddress.port);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Tor delay simulation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -100,7 +100,7 @@ public class TorNetworkNode extends NetworkNode {
|
|||
|
||||
return torNetworkNode.connectToHiddenService(peerNodeAddress.hostName, peerNodeAddress.port);
|
||||
}
|
||||
|
||||
|
||||
public Socks5Proxy getSocksProxy() {
|
||||
return torNetworkNode != null ? torNetworkNode.getSocksProxy() : null;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public final class GetDataResponse implements SupportedCapabilitiesMessage {
|
|||
public final HashSet<ProtectedStorageEntry> dataSet;
|
||||
public final int requestNonce;
|
||||
public final boolean isGetUpdatedDataResponse;
|
||||
|
||||
|
||||
@Nullable
|
||||
private ArrayList<Integer> supportedCapabilities = Capabilities.getCapabilities();
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ public class KeepAliveManager implements MessageListener, ConnectionListener, Pe
|
|||
keepAlive();
|
||||
}, INTERVAL_SEC);
|
||||
}
|
||||
|
||||
|
||||
private void keepAlive() {
|
||||
if (!stopped) {
|
||||
Log.traceCall();
|
||||
|
|
|
@ -18,6 +18,7 @@ public final class GetPeersResponse extends PeerExchangeMessage implements Suppo
|
|||
|
||||
@Nullable
|
||||
private ArrayList<Integer> supportedCapabilities = Capabilities.getCapabilities();
|
||||
|
||||
public GetPeersResponse(int requestNonce, HashSet<Peer> reportedPeers) {
|
||||
this.requestNonce = requestNonce;
|
||||
this.reportedPeers = reportedPeers;
|
||||
|
|
|
@ -120,7 +120,7 @@ public class SeedNodeMain extends BitsquareExecutable {
|
|||
log.error(t.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UserThread.runPeriodically(() -> {
|
||||
Profiler.printSystemLoad(log);
|
||||
long usedMemoryInMB = Profiler.getUsedMemoryInMB();
|
||||
|
|
Loading…
Add table
Reference in a new issue