dnsseed: don't wait for full crawl on setup

This commit is contained in:
George Tankersley 2020-05-25 17:38:55 -04:00
parent e57eebd627
commit bf13b85d1c
1 changed files with 5 additions and 2 deletions

View File

@ -68,8 +68,11 @@ func setup(c *caddy.Controller) error {
// Send the initial request for more addresses; spawns goroutines to process the responses.
// Ready() will flip to true once we've received and confirmed at least 10 peers.
seeder.RequestAddresses()
seeder.DisconnectAllPeers()
go runCrawl(seeder)
err = seeder.WaitForAddresses(1, 30*time.Second)
if err != nil {
return plugin.Error(pluginName, c.Err("went 30 second without a single address"))
}
// Start the update timer
go func() {