Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

swarm/pot: Unconfirmed po results from pot tests #1104

Closed
nolash opened this issue Jan 11, 2019 · 0 comments · Fixed by ethereum/go-ethereum#18452
Closed

swarm/pot: Unconfirmed po results from pot tests #1104

nolash opened this issue Jan 11, 2019 · 0 comments · Fixed by ethereum/go-ethereum#18452
Assignees

Comments

@nolash
Copy link
Contributor

nolash commented Jan 11, 2019

This is an unanswered question left over from #1098 - regarding the swarm/pot:TestRemove* tests:


The unexpected po results in the tests arise from the fact that in the case of a hierarchical Pot (TestRemoveSameBin) the po values reported are distances between the added elements, whereas the flat Pot (TestRemoveDifferentBins) the po values are the distances between the added elements and the pinned value. It's not currently clear whether this is a feature or bug.

Also, the po value of the pinned value is 0 because it's explicitly set to this. This value has no meaning for the pinned address, since the Pot is hierarchical, and the pinned value, representing the root of the hierarchy, has nothing to compare its po to. However, this po is also included in the result arrays in the test, which is nonsensical at best (po for pinned value has no meaning) to inconsequential at worst (po is sometimes in relation to pinned value, sometimes not, and in the former case the value should be 256 instead).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.