Package org.bitcoinj.net.discovery
Class SeedPeers
java.lang.Object
org.bitcoinj.net.discovery.SeedPeers
- All Implemented Interfaces:
- PeerDiscovery
SeedPeers stores a pre-determined list of Bitcoin node addresses. These nodes are selected based on being
 active on the network for a long period of time. The intention is to be a last resort way of finding a connection
 to the network, in case IRC and DNS fail. The list comes from the Bitcoin C++ source code.
- 
Constructor SummaryConstructorsConstructorDescriptionSeedPeers(int[] seedAddrInts, NetworkParameters params) Deprecated.SeedPeers(InetSocketAddress[] seedAddrs) Supports finding peers by IP addresses/portsSeedPeers(NetworkParameters params) Deprecated.
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bitcoinj.net.discovery.PeerDiscoverygetPeers
- 
Constructor Details- 
SeedPeersSupports finding peers by IP addresses/ports- Parameters:
- seedAddrs- IP addresses/ports of seeds.
 
- 
SeedPeersDeprecated.Supports finding peers by IP addresses- Parameters:
- params- Network parameters to be used for port information.
 
- 
SeedPeersDeprecated.Supports finding peers by IP addresses- Parameters:
- seedAddrInts- IP addresses for seed addresses.
- params- Network parameters to be used for port information.
 
 
- 
- 
Method Details- 
getPeerActs as an iterator, returning the address of each node in the list sequentially. Once all the list has been iterated, null will be returned for each subsequent query.- Returns:
- InetSocketAddress - The address/port of the next node.
 
- 
getPeersReturns all the Bitcoin nodes within the list.- Specified by:
- getPeersin interface- PeerDiscovery
- Parameters:
- services- ignored
- timeout- ignored
- Returns:
- the pre-determined list of peers
 
- 
shutdownpublic void shutdown()Description copied from interface:PeerDiscoveryStops any discovery in progress when we want to shut down quickly.- Specified by:
- shutdownin interface- PeerDiscovery
 
 
- 
SeedPeers(InetSocketAddress[])