Switch from missinggo/MultiLess to anacrolix/multiless
This commit is contained in:
parent
83a8284d6a
commit
c17186bf85
|
@ -1,7 +0,0 @@
|
||||||
package torrent
|
|
||||||
|
|
||||||
import "github.com/anacrolix/missinggo/v2"
|
|
||||||
|
|
||||||
type (
|
|
||||||
multiLess = missinggo.MultiLess
|
|
||||||
)
|
|
|
@ -222,10 +222,10 @@ func (cn *PeerConn) isPreferredDirection() bool {
|
||||||
// considering only their networking properties. If ok is false, we can't
|
// considering only their networking properties. If ok is false, we can't
|
||||||
// decide.
|
// decide.
|
||||||
func (l *PeerConn) hasPreferredNetworkOver(r *PeerConn) bool {
|
func (l *PeerConn) hasPreferredNetworkOver(r *PeerConn) bool {
|
||||||
var ml multiLess
|
var ml multiless.Computation
|
||||||
ml.NextBool(l.isPreferredDirection(), r.isPreferredDirection())
|
ml = ml.Bool(r.isPreferredDirection(), l.isPreferredDirection())
|
||||||
ml.NextBool(!l.utp(), !r.utp())
|
ml = ml.Bool(l.utp(), r.utp())
|
||||||
ml.NextBool(l.ipv6(), r.ipv6())
|
ml = ml.Bool(r.ipv6(), l.ipv6())
|
||||||
return ml.Less()
|
return ml.Less()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue