diff --git a/mixing/mixclient/client.go b/mixing/mixclient/client.go index a1550ed41..66df0f128 100644 --- a/mixing/mixclient/client.go +++ b/mixing/mixclient/client.go @@ -1908,7 +1908,7 @@ func (c *Client) alternateSession(pairing []byte, prs []*wire.MsgMixPairReq, d * kes := c.mixpool.ReceiveKEsByPairing(pairing, unixEpoch) // Sort KEs by identity first (just to group these together) followed - // by the total referenced PR counts in decreasing order. + // by the total referenced PR counts in increasing order. // When ranging over KEs below, this will allow us to consider the // order in which other peers created their KEs, and how they are // forming their sessions. @@ -1918,7 +1918,7 @@ func (c *Client) alternateSession(pairing []byte, prs []*wire.MsgMixPairReq, d * if bytes.Compare(a.Identity[:], b.Identity[:]) == -1 { return true } - if len(a.SeenPRs) > len(b.SeenPRs) { + if len(a.SeenPRs) < len(b.SeenPRs) { return true } return false @@ -1931,7 +1931,7 @@ func (c *Client) alternateSession(pairing []byte, prs []*wire.MsgMixPairReq, d * prHashByIdentity[pr.Identity] = pr.Hash() } - // Only one KE per peer identity (the KE that references the most PR + // Only one KE per peer identity (the KE that references the least PR // hashes) is used for determining session agreement. type peerMsgs struct { pr *wire.MsgMixPairReq