zcash: bump user agent version
This commit is contained in:
parent
16d803bb86
commit
8ad2dadae1
|
@ -175,21 +175,18 @@ func parseConfig(c *caddy.Controller) (*options, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func runCrawl(name string, seeder *zcash.Seeder) {
|
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()
|
start := time.Now()
|
||||||
|
|
||||||
// Slow motion crawl: we'll get them all eventually!
|
// Make sure our addresses are still live and leave the connections open
|
||||||
|
// (true would disconnect immediately).
|
||||||
// 1. Make sure our addresses are still live and leave the
|
|
||||||
// connections open (true would disconnect immediately).
|
|
||||||
seeder.RefreshAddresses(false)
|
seeder.RefreshAddresses(false)
|
||||||
|
|
||||||
// 2. Request addresses from everyone we're connected to,
|
// Request addresses from everyone we're connected to, synchronously. This
|
||||||
// synchronously. This will block a while in an attempt
|
// will block a while in an attempt to catch all of the addr responses it
|
||||||
// to catch all of the addr responses it can.
|
// can.
|
||||||
newPeerCount := seeder.RequestAddresses()
|
newPeerCount := seeder.RequestAddresses()
|
||||||
|
|
||||||
// 3. Disconnect from everyone & leave them alone for a while
|
// Disconnect and leave everyone alone for a while.
|
||||||
seeder.DisconnectAllPeers()
|
seeder.DisconnectAllPeers()
|
||||||
|
|
||||||
elapsed := time.Now().Sub(start).Truncate(time.Second).Seconds()
|
elapsed := time.Now().Sub(start).Truncate(time.Second).Seconds()
|
||||||
|
|
|
@ -28,7 +28,7 @@ var (
|
||||||
|
|
||||||
var defaultPeerConfig = &peer.Config{
|
var defaultPeerConfig = &peer.Config{
|
||||||
UserAgentName: "zfnd-seeder",
|
UserAgentName: "zfnd-seeder",
|
||||||
UserAgentVersion: "0.1.0",
|
UserAgentVersion: "0.1.1",
|
||||||
ChainParams: nil,
|
ChainParams: nil,
|
||||||
Services: 0,
|
Services: 0,
|
||||||
TrickleInterval: time.Second * 10,
|
TrickleInterval: time.Second * 10,
|
||||||
|
|
Loading…
Reference in New Issue