package com.msgilligan.peerlist.config;

import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.net.discovery.DnsDiscovery;
import org.bitcoinj.net.discovery.PeerDiscovery;
import org.bitcoinj.net.discovery.SeedPeers;
import org.bitcoinj.params.MainNetParams;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.FileNotFoundException;

/**
 * User: sean
 * Date: 2/22/14
 * Time: 7:56 PM
 */
@Configuration
public class BitcoinConfig {
    @Bean
    public NetworkParameters networkParameters() {
        return MainNetParams.get();
    }

    @Bean
    public PeerDiscovery peerDiscovery(NetworkParameters params) throws FileNotFoundException {
        PeerDiscovery pd;
//        pd = new DnsDiscovery(params);
        pd = new SeedPeers(params);
        return pd;
    }
}

@@ -755,10 +755,8 @@
 pd;%0A
-//
     
@@ -782,32 +782,34 @@
 covery(params);%0A
+//
         pd = new

Switch to DNS peer discovery.