zcash: bump user agent version

This commit is contained in:
George Tankersley 2020-06-09 11:38:32 -04:00
parent 16d803bb86
commit 8ad2dadae1
2 changed files with 7 additions and 10 deletions

View File

@ -175,21 +175,18 @@ func parseConfig(c *caddy.Controller) (*options, error) {
}
func runCrawl(name string, seeder *zcash.Seeder) {
log.Infof("[%s] Beginning %s crawl", time.Now().Format("2006/01/02 15:04:05"), name)
start := time.Now()
// Slow motion crawl: we'll get them all eventually!
// 1. Make sure our addresses are still live and leave the
// connections open (true would disconnect immediately).
// Make sure our addresses are still live and leave the connections open
// (true would disconnect immediately).
seeder.RefreshAddresses(false)
// 2. Request addresses from everyone we're connected to,
// synchronously. This will block a while in an attempt
// to catch all of the addr responses it can.
// Request addresses from everyone we're connected to, synchronously. This
// will block a while in an attempt to catch all of the addr responses it
// can.
newPeerCount := seeder.RequestAddresses()
// 3. Disconnect from everyone & leave them alone for a while
// Disconnect and leave everyone alone for a while.
seeder.DisconnectAllPeers()
elapsed := time.Now().Sub(start).Truncate(time.Second).Seconds()

View File

@ -28,7 +28,7 @@ var (
var defaultPeerConfig = &peer.Config{
UserAgentName: "zfnd-seeder",
UserAgentVersion: "0.1.0",
UserAgentVersion: "0.1.1",
ChainParams: nil,
Services: 0,
TrickleInterval: time.Second * 10,