@Test public void getPeers_length() throws Exception{ SeedPeers seedPeers = new SeedPeers(MAINNET); List<InetSocketAddress> addresses = seedPeers.getPeers(0, 0, TimeUnit.SECONDS); assertThat(addresses.size(), equalTo(MAINNET.getAddrSeeds().length)); }
@Override public List<InetSocketAddress> getPeers(long services, long timeoutValue, TimeUnit timeoutUnit) throws PeerDiscoveryException { if (services != 0) throw new PeerDiscoveryException("Pre-determined peers cannot be filtered by services: " + services); try { return allPeers(); } catch (UnknownHostException e) { throw new PeerDiscoveryException(e); } }
SeedPeers implements PeerDiscovery { @Override public List<InetSocketAddress> getPeers(long services, long timeoutValue, TimeUnit timeoutUnit) throws PeerDiscoveryException { if (services != 0) throw new PeerDiscoveryException("Pre-determined peers cannot be filtered by services: " + services); try { return allPeers(); } catch (UnknownHostException e) { throw new PeerDiscoveryException(e); } } }
SeedPeers implements PeerDiscovery { @Override public List<InetSocketAddress> getPeers(long services, long timeoutValue, TimeUnit timeoutUnit) throws PeerDiscoveryException { if (services != 0) throw new PeerDiscoveryException("Pre-determined peers cannot be filtered by services: " + services); try { return allPeers(); } catch (UnknownHostException e) { throw new PeerDiscoveryException(e); } } SeedPeers(NetworkParameters params);  SeedPeers(int[] seedAddrs, NetworkParameters params); }
SeedPeers implements PeerDiscovery { @Override public List<InetSocketAddress> getPeers(long services, long timeoutValue, TimeUnit timeoutUnit) throws PeerDiscoveryException { if (services != 0) throw new PeerDiscoveryException("Pre-determined peers cannot be filtered by services: " + services); try { return allPeers(); } catch (UnknownHostException e) { throw new PeerDiscoveryException(e); } } SeedPeers(NetworkParameters params);  SeedPeers(int[] seedAddrs, NetworkParameters params); @Nullable InetSocketAddress getPeer(); @Override List<InetSocketAddress> getPeers(long services, long timeoutValue, TimeUnit timeoutUnit); @Override void shutdown(); }
SeedPeers implements PeerDiscovery { @Override public List<InetSocketAddress> getPeers(long services, long timeoutValue, TimeUnit timeoutUnit) throws PeerDiscoveryException { if (services != 0) throw new PeerDiscoveryException("Pre-determined peers cannot be filtered by services: " + services); try { return allPeers(); } catch (UnknownHostException e) { throw new PeerDiscoveryException(e); } } SeedPeers(NetworkParameters params);  SeedPeers(int[] seedAddrs, NetworkParameters params); @Nullable InetSocketAddress getPeer(); @Override List<InetSocketAddress> getPeers(long services, long timeoutValue, TimeUnit timeoutUnit); @Override void shutdown();  }