ethereum / ddht

Python implementation of Discovery V5 Protocol
MIT License
18 stars 16 forks source link

Fix ResourceQueue error #313

Closed pipermerriam closed 3 years ago

pipermerriam commented 3 years ago

fixes #310

What was wrong?

Failing test due to invalid initialization of the ResourceQueue

How was it fixed?

The ResourceQueue used for the segments for content retrieval was incorrectly being initialized with all of the segments duplicated 4x.

I both fixed this simple error and re-designed the queue to remove the complexity of having to define an upper bound on the number of elements in the queue.

Cute Animal Picture

animals-smelling-flowers-35__880

pipermerriam commented 3 years ago

@gsalgado fix ended up being quick so I just did it.