Open yangeagle opened 5 years ago
cc @sjmudd who authored this code.
@shlomi-noach @sjmudd any update? It obviously feels like a bug.
This is code that's been around for a long time but after looking again I think I would agree. I am tempted to modify this however to reflect the complete length of the discovery queue. That is both the pending (queued
) plus being processed (consumed
) entries as that is the total size.
e.g.
return len(q.queuedKeys) + len(q.consumedKeys)
So prior to making any changes I wonder what you were looking for?
@sjmudd separation's good.
@MOON-CLJ: thanks for catching this. I've made a PR which I think should address the issue.
file:
go/discovery/queue.go
code:
I am confused about the calculation of the queue length.
q.queue
andq.queuedKeys
are the same.Is there double counting here?
Thank you!
@MOON-CLJ