diff --git a/wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.java b/wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.java index 722da2ed39..a06274086f 100644 --- a/wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.java +++ b/wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.java @@ -53,6 +53,7 @@ import org.bitcoinj.core.CheckpointManager; import org.bitcoinj.core.Coin; import org.bitcoinj.core.FilteredBlock; +import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.Peer; import org.bitcoinj.core.PeerGroup; import org.bitcoinj.core.Sha256Hash; @@ -709,6 +710,13 @@ public InetSocketAddress[] getPeers(final long services, final long timeoutValue log.info("DMN peer discovery returned less than 16 nodes. Adding default DMN peers to the list to increase connections"); MasternodePeerDiscovery discovery = new MasternodePeerDiscovery(defaultMNList, Constants.NETWORK_PARAMETERS.getPort()); peers.addAll(Arrays.asList(discovery.getPeers(services, timeoutValue, timeoutUnit))); + + // use EvoNodes if the network is small + if (peers.size() < MINIMUM_PEER_COUNT) { + String [] defaultEvoNodeList = Constants.NETWORK_PARAMETERS.getDefaultHPMasternodeList(); + MasternodePeerDiscovery discoveryEvo = new MasternodePeerDiscovery(defaultEvoNodeList, Constants.NETWORK_PARAMETERS.getPort()); + peers.addAll(Arrays.asList(discoveryEvo.getPeers(services, timeoutValue, timeoutUnit))); + } } else { log.info("DNS peer discovery returned less than 16 nodes. Unable to add seed peers (it is not specified for this network)."); }