mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +01:00
Rename WalletNetworkConfig to BtcNetworkConfig
This commit is contained in:
parent
06d0a4a80a
commit
6e90554f84
3 changed files with 10 additions and 10 deletions
|
@ -34,8 +34,8 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class WalletNetworkConfig {
|
||||
private static final Logger log = LoggerFactory.getLogger(WalletNetworkConfig.class);
|
||||
public class BtcNetworkConfig {
|
||||
private static final Logger log = LoggerFactory.getLogger(BtcNetworkConfig.class);
|
||||
|
||||
@Nullable
|
||||
private final Socks5Proxy proxy;
|
||||
|
@ -43,8 +43,8 @@ public class WalletNetworkConfig {
|
|||
private final NetworkParameters parameters;
|
||||
private final int socks5DiscoverMode;
|
||||
|
||||
public WalletNetworkConfig(WalletConfig delegate, NetworkParameters parameters, int socks5DiscoverMode,
|
||||
@Nullable Socks5Proxy proxy) {
|
||||
public BtcNetworkConfig(WalletConfig delegate, NetworkParameters parameters, int socks5DiscoverMode,
|
||||
@Nullable Socks5Proxy proxy) {
|
||||
this.delegate = delegate;
|
||||
this.parameters = parameters;
|
||||
this.socks5DiscoverMode = socks5DiscoverMode;
|
|
@ -23,10 +23,10 @@ import bisq.core.btc.model.AddressEntry;
|
|||
import bisq.core.btc.model.AddressEntryList;
|
||||
import bisq.core.btc.network.BitcoinNodes;
|
||||
import bisq.core.btc.network.BitcoinNodes.BtcNode;
|
||||
import bisq.core.btc.network.BtcNetworkConfig;
|
||||
import bisq.core.btc.network.BtcNodesSetupPreferences;
|
||||
import bisq.core.btc.network.PeerAddressesRepository;
|
||||
import bisq.core.btc.network.RegTestHost;
|
||||
import bisq.core.btc.network.WalletNetworkConfig;
|
||||
import bisq.core.user.Preferences;
|
||||
|
||||
import bisq.network.Socks5MultiDiscovery;
|
||||
|
@ -335,7 +335,7 @@ public class WalletsSetup {
|
|||
boolean isUseClearNodesWithProxies = (useAllProvidedNodes || btcNodesSetupPreferences.isUseCustomNodes());
|
||||
List<PeerAddress> peers = repository.getPeerAddresses(proxy, isUseClearNodesWithProxies);
|
||||
|
||||
WalletNetworkConfig networkConfig = new WalletNetworkConfig(walletConfig, params, socks5DiscoverMode, proxy);
|
||||
BtcNetworkConfig networkConfig = new BtcNetworkConfig(walletConfig, params, socks5DiscoverMode, proxy);
|
||||
networkConfig.proposePeers(peers);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import static org.mockito.Mockito.mock;
|
|||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
public class WalletNetworkConfigTest {
|
||||
public class BtcNetworkConfigTest {
|
||||
private static final int MODE = 0;
|
||||
|
||||
private WalletConfig delegate;
|
||||
|
@ -48,7 +48,7 @@ public class WalletNetworkConfigTest {
|
|||
|
||||
@Test
|
||||
public void testProposePeersWhenProxyPresentAndNoPeers() {
|
||||
WalletNetworkConfig config = new WalletNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
BtcNetworkConfig config = new BtcNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
mock(Socks5Proxy.class));
|
||||
config.proposePeers(Collections.emptyList());
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class WalletNetworkConfigTest {
|
|||
|
||||
@Test
|
||||
public void testProposePeersWhenProxyNotPresentAndNoPeers() {
|
||||
WalletNetworkConfig config = new WalletNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
BtcNetworkConfig config = new BtcNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
null);
|
||||
config.proposePeers(Collections.emptyList());
|
||||
|
||||
|
@ -68,7 +68,7 @@ public class WalletNetworkConfigTest {
|
|||
|
||||
@Test
|
||||
public void testProposePeersWhenPeersPresent() {
|
||||
WalletNetworkConfig config = new WalletNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
BtcNetworkConfig config = new BtcNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
null);
|
||||
config.proposePeers(Collections.singletonList(mock(PeerAddress.class)));
|
||||
|
Loading…
Add table
Reference in a new issue