From ba466d40eeeeba64a1299a6b10aba60bee5386ae Mon Sep 17 00:00:00 2001 From: Devin Bileck <603793+devinbileck@users.noreply.github.com> Date: Wed, 30 Jan 2019 15:24:00 -0800 Subject: [PATCH] Update logging indicating number of btc nodes The logged message that indicates the number of btc nodes to connect to was incorrect when only a single node is used in regtest mode. --- core/src/main/java/bisq/core/btc/setup/WalletConfig.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/bisq/core/btc/setup/WalletConfig.java b/core/src/main/java/bisq/core/btc/setup/WalletConfig.java index 3e88fd6395..a68ed53414 100644 --- a/core/src/main/java/bisq/core/btc/setup/WalletConfig.java +++ b/core/src/main/java/bisq/core/btc/setup/WalletConfig.java @@ -446,8 +446,9 @@ public class WalletConfig extends AbstractIdleService { // before we're actually connected the broadcast waits for an appropriate number of connections. if (peerAddresses != null) { for (PeerAddress addr : peerAddresses) vPeerGroup.addAddress(addr); - log.info("We try to connect to {} btc nodes", numConnectionForBtc); - vPeerGroup.setMaxConnections(Math.min(numConnectionForBtc, peerAddresses.length)); + int maxConnections = Math.min(numConnectionForBtc, peerAddresses.length); + log.info("We try to connect to {} btc nodes", maxConnections); + vPeerGroup.setMaxConnections(maxConnections); peerAddresses = null; } else if (!params.equals(RegTestParams.get())) { vPeerGroup.addPeerDiscovery(discovery != null ? discovery : new DnsDiscovery(params));