mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm/network: Add comments
This commit is contained in:
parent
d45b0c4834
commit
412b02f416
2 changed files with 3 additions and 1 deletions
|
|
@ -474,7 +474,7 @@ func depthForPot(p *pot.Pot, minProxBinSize int, pivotAddr []byte) (depth int) {
|
|||
}
|
||||
p.EachNeighbour(pivotAddr, Pof, f)
|
||||
|
||||
// the second step is to start from the top and test for empty bins
|
||||
// the second step is to test for empty bins in order from shallowest to deepest
|
||||
// if an empty bin is found, this will be the actual depth
|
||||
// we stop iterating if we hit the maxDepth determined in the first step
|
||||
p.EachBin(pivotAddr, Pof, 0, func(po int, _ int, f func(func(pot.Val, int) bool) bool) bool {
|
||||
|
|
|
|||
|
|
@ -162,6 +162,8 @@ func TestNeighbourhoodDepth(t *testing.T) {
|
|||
testNum++
|
||||
}
|
||||
|
||||
// TestHealthStrict tests the simplest definition of health
|
||||
// Which means whether we are connected to all neighbors we know of
|
||||
func TestHealthStrict(t *testing.T) {
|
||||
|
||||
// base address is all zeros
|
||||
|
|
|
|||
Loading…
Reference in a new issue