MCPcopy Create free account
hub / github.com/distributed/malus / BucketNo

Function BucketNo

lib/utility.go:59–77  ·  view source on GitHub ↗

Returns into which bucket the given Distance d falls. BucketNo counts upwards from MSB to LSB, from d[0] to d[len(d)-1], e.g. if the MSB of d[0] is set it returns 0, if the MSB of d[1] is set, it returns 8. If the distance is zero, it returns len(d) * 8.

(d Distance)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

findHostMethod · 0.85
balanceleftrightMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected