@Test public void testBuildDiscoveries() throws PeerDiscoveryException { String[] seeds = new String[] { "seed.bitcoin.sipa.be", "dnsseed.bluematt.me" }; DnsDiscovery dnsDiscovery = new DnsDiscovery(seeds, MainNetParams.get()); assertTrue(dnsDiscovery.seeds.size() == 2); for (PeerDiscovery peerDiscovery : dnsDiscovery.seeds) { assertTrue(peerDiscovery.getPeers(0, 100, TimeUnit.MILLISECONDS).size() > 0); } }
private static List<PeerDiscovery> buildDiscoveries(NetworkParameters params, String[] seeds) { List<PeerDiscovery> discoveries = new ArrayList<>(); if (seeds != null) for (String seed : seeds) discoveries.add(new DnsSeedDiscovery(params, seed)); return discoveries; }
DnsDiscovery extends MultiplexingDiscovery { private static List<PeerDiscovery> buildDiscoveries(NetworkParameters params, String[] seeds) { List<PeerDiscovery> discoveries = new ArrayList<>(); if (seeds != null) for (String seed : seeds) discoveries.add(new DnsSeedDiscovery(params, seed)); return discoveries; } }
DnsDiscovery extends MultiplexingDiscovery { private static List<PeerDiscovery> buildDiscoveries(NetworkParameters params, String[] seeds) { List<PeerDiscovery> discoveries = new ArrayList<>(); if (seeds != null) for (String seed : seeds) discoveries.add(new DnsSeedDiscovery(params, seed)); return discoveries; } DnsDiscovery(NetworkParameters netParams);  DnsDiscovery(String[] dnsSeeds, NetworkParameters params); }
DnsDiscovery extends MultiplexingDiscovery { private static List<PeerDiscovery> buildDiscoveries(NetworkParameters params, String[] seeds) { List<PeerDiscovery> discoveries = new ArrayList<>(); if (seeds != null) for (String seed : seeds) discoveries.add(new DnsSeedDiscovery(params, seed)); return discoveries; } DnsDiscovery(NetworkParameters netParams);  DnsDiscovery(String[] dnsSeeds, NetworkParameters params);  }
DnsDiscovery extends MultiplexingDiscovery { private static List<PeerDiscovery> buildDiscoveries(NetworkParameters params, String[] seeds) { List<PeerDiscovery> discoveries = new ArrayList<>(); if (seeds != null) for (String seed : seeds) discoveries.add(new DnsSeedDiscovery(params, seed)); return discoveries; } DnsDiscovery(NetworkParameters netParams);  DnsDiscovery(String[] dnsSeeds, NetworkParameters params);   }