les: sp test fix

This commit is contained in:
Zsolt Felfoldi 2020-05-04 13:14:07 +02:00
parent 4f94866093
commit 477b5cd520

View file

@ -104,7 +104,9 @@ func (w *WrsIterator) chooseNode() *enode.Node {
// non-empty here, Choose might return nil if all items have weight
// zero.
if c := w.wrs.Choose(); c != nil {
return w.ns.GetNode(c.(enode.ID))
id := c.(enode.ID)
w.wrs.Remove(id)
return w.ns.GetNode(id)
}
}