mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
les: sp test fix
This commit is contained in:
parent
4f94866093
commit
477b5cd520
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue