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

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

@nolash

Description

@nolash

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).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions