mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-06 16:58:11 +08:00
keyspace XOR naming
This commit is contained in:
parent
f8d70f344b
commit
331e43328e
@ -31,11 +31,11 @@ func (id ID) less(other ID) bool {
|
||||
}
|
||||
|
||||
func xor(a, b ID) ID {
|
||||
return ID(ks.XOR(a, b))
|
||||
return ID(u.XOR(a, b))
|
||||
}
|
||||
|
||||
func commonPrefixLen(a, b ID) int {
|
||||
return ks.ZeroPrefixLen(ks.XOR(a, b))
|
||||
return ks.ZeroPrefixLen(u.XOR(a, b))
|
||||
}
|
||||
|
||||
// ConvertPeerID creates a DHT ID by hashing a Peer ID (Multihash)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user