(tested) fix redis to pass tests

* delete info hash count key from redis (replaced with SCARD on infohash set)
* add GC test
* add peer.Addr() functio to always return unwrapped address if 4to6 appear
This commit is contained in:
Lawrence, Rendall
2022-04-15 01:29:57 +03:00
parent 5c2471ca9b
commit 397e106396
17 changed files with 287 additions and 261 deletions

View File

@@ -27,7 +27,7 @@ func SanitizeAnnounce(r *AnnounceRequest, maxNumWant, defaultNumWant uint32) err
r.NumWant = maxNumWant
}
r.AddrPort = netip.AddrPortFrom(r.Addr().Unmap(), r.Port())
r.AddrPort = netip.AddrPortFrom(r.Addr(), r.Port())
if !r.Addr().IsValid() || r.Addr().IsUnspecified() {
return ErrInvalidIP
}