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
|
||||
// decide.
|
||||
func (l *PeerConn) hasPreferredNetworkOver(r *PeerConn) bool {
|
||||
var ml multiLess
|
||||
ml.NextBool(l.isPreferredDirection(), r.isPreferredDirection())
|
||||
ml.NextBool(!l.utp(), !r.utp())
|
||||
ml.NextBool(l.ipv6(), r.ipv6())
|
||||
var ml multiless.Computation
|
||||
ml = ml.Bool(r.isPreferredDirection(), l.isPreferredDirection())
|
||||
ml = ml.Bool(l.utp(), r.utp())
|
||||
ml = ml.Bool(r.ipv6(), l.ipv6())
|
||||
return ml.Less()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue