diff --git a/cmd.go b/cmd.go index 7fffbb4..07493f1 100644 --- a/cmd.go +++ b/cmd.go @@ -29,7 +29,7 @@ type Options struct { Seed []string `short:"s" long:"seed" description:"Override which seeds to use." default-mask:""` Concurrency int `short:"c" long:"concurrency" description:"Maximum number of concurrent connections to open." default:"10"` ConnectTimeout time.Duration `short:"t" long:"connect-timeout" description:"Maximum time to wait to connect before giving up." default:"10s"` - UserAgent string `short:"A" long:"user-agent" description:"Client name to advertise while crawling. Should be in format of '/name:x.y.z/'." default:"/btc-crawl:0.1.1/"` + UserAgent string `short:"A" long:"user-agent" description:"Client name to advertise while crawling. Should be in format of '/name:x.y.z/'." default:"/btc-crawl:0.1.2/"` PeerAge time.Duration `long:"peer-age" description:"Ignore discovered peers older than this." default:"24h"` StopAfter int `long:"stop-after" description:"Stop crawling after this many results." default:"0"` } diff --git a/crawler.go b/crawler.go index 36c2e38..dcaba4e 100644 --- a/crawler.go +++ b/crawler.go @@ -101,6 +101,7 @@ func (c *Crawler) handleAddress(address string) *Result { // many unrelated messages. msg, _, err := peer.ReadMessage() if err != nil { + otherMessages = append(otherMessages, err.Error()) logger.Warningf("[%s] Failed to read message: %v", address, err) continue }