diff --git a/core/src/main/scala/org/bitcoins/core/config/NetworkParameters.scala b/core/src/main/scala/org/bitcoins/core/config/NetworkParameters.scala index 2f6d023136..1de305d09e 100644 --- a/core/src/main/scala/org/bitcoins/core/config/NetworkParameters.scala +++ b/core/src/main/scala/org/bitcoins/core/config/NetworkParameters.scala @@ -72,13 +72,14 @@ sealed abstract class MainNet extends BitcoinNetwork { Vector( // "seed.bitcoin.sipa.be", very slow, commenting out for now "dnsseed.bluematt.me", - "dnsseed.bitcoin.dashjr.org", + "dnsseed.bitcoin.dashjr-list-of-p2p-nodes.us", "seed.bitcoinstats.com", // "seed.btc.petertodd.net", very slow, commenting out for now - "seed.bitcoin.jonasschnelli.ch", + // "seed.bitcoin.jonasschnelli.ch", seems to be down? "seed.bitcoin.sprovoost.nl", "dnsseed.emzy.de", - "seed.bitcoin.wiz.biz" + "seed.bitcoin.wiz.biz", + "seed.mainnet.achownodes.xyz" ) } @@ -104,10 +105,13 @@ sealed abstract class TestNet3 extends BitcoinNetwork { /** @inheritdoc */ override def dnsSeeds: Seq[String] = - Seq("testnet-seed.bitcoin.jonasschnelli.ch", - "seed.tbtc.petertodd.org", - "seed.testnet.bitcoin.sprovoost.nl", - "testnet-seed.bluematt.me") + Seq( + "testnet-seed.bitcoin.jonasschnelli.ch", + "seed.tbtc.petertodd.org", + "seed.testnet.bitcoin.sprovoost.nl", + "testnet-seed.bluematt.me", + "seed.testnet.achownodes.xyz" + ) /* * @inheritdoc */ diff --git a/node/src/main/scala/org/bitcoins/node/PeerFinder.scala b/node/src/main/scala/org/bitcoins/node/PeerFinder.scala index 9d0a6e7e58..a4c2ea1a70 100644 --- a/node/src/main/scala/org/bitcoins/node/PeerFinder.scala +++ b/node/src/main/scala/org/bitcoins/node/PeerFinder.scala @@ -45,7 +45,7 @@ case class PeerFinder( /** Returns peers by querying each dns seed once. These will be IPv4 * addresses. */ - private def getPeersFromDnsSeeds: Future[Vector[Peer]] = { + private lazy val getPeersFromDnsSeeds: Future[Vector[Peer]] = { val dnsSeeds = nodeAppConfig.network.dnsSeeds val addressesF: Future[Vector[String]] = Future .traverse(dnsSeeds) { seed => @@ -163,12 +163,12 @@ case class PeerFinder( _peersToTry.pushAll(pds, priority = 2) val peerDiscoveryF = if (nodeAppConfig.enablePeerDiscovery) { + val dnsF = getPeersFromDnsSeeds val startedF = for { (dbNonCfPeerDb, dbCfPeerDb) <- getPeersFromDb dbNonCf = dbNonCfPeerDb.map(_.peer(nodeAppConfig.socks5ProxyParams)) dbCf = dbCfPeerDb.map(_.peer(nodeAppConfig.socks5ProxyParams)) - peersDbs <- getPeersFromDnsSeeds.map(dns => - dns ++ getPeersFromResources ++ dbNonCf) + peersDbs <- dnsF.map(dns => dns ++ getPeersFromResources ++ dbNonCf) } yield { val pds = peersDbs.map(p => buildPeerData(p, isPersistent = false)) _peersToTry.pushAll(pds)