client.go | 2 +- client_test.go | 5 ++--- diff --git a/client.go b/client.go index f0d21cac9580d6b06b46c57e7db121b84c7c9641..646d77657d07490fcb4fc507a7e40a7efaaa096d 100644 --- a/client.go +++ b/client.go @@ -105,7 +105,7 @@ dhtStats := s.Stats() fmt.Fprintf(w, "\tDHT nodes: %d (%d good, %d banned)\n", dhtStats.Nodes, dhtStats.GoodNodes, dhtStats.BadNodes) fmt.Fprintf(w, "\tDHT Server ID: %x\n", s.ID()) fmt.Fprintf(w, "\tDHT port: %d\n", missinggo.AddrPort(s.Addr())) - fmt.Fprintf(w, "\tDHT announces: %d\n", dhtStats.ConfirmedAnnounces) + fmt.Fprintf(w, "\tDHT announces: %d\n", dhtStats.SuccessfulOutboundAnnouncePeerQueries) fmt.Fprintf(w, "\tOutstanding transactions: %d\n", dhtStats.OutstandingTransactions) } diff --git a/client_test.go b/client_test.go index 5e176218756d4149b6ccc5c62864c9f3072f8406..1b07f9c5abe69b02944ae27ed95f4043e14a02f1 100644 --- a/client_test.go +++ b/client_test.go @@ -766,10 +766,9 @@ // cfg.DHTConfig.NoSecurity = true cl, err := NewClient(cfg) require.NoError(t, err) defer cl.Close() - sum := func() (ret int) { + sum := func() (ret int64) { cl.eachDhtServer(func(s *dht.Server) { - ret += s.NumNodes() - ret += s.Stats().OutstandingTransactions + ret += s.Stats().OutboundQueriesAttempted }) return }