mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 03:10:48 +00:00
common/prque: reset indexOffset in LazyQueue.Reset
Reset replaced the internal queues but left indexOffset unchanged. After an odd number of refreshes this left setIndex0/setIndex1 mapping inverted for subsequent use.
This commit is contained in:
parent
abfb2de574
commit
808f810b5f
1 changed files with 1 additions and 0 deletions
|
|
@ -75,6 +75,7 @@ func NewLazyQueue[P cmp.Ordered, V any](setIndex SetIndexCallback[V], priority P
|
|||
func (q *LazyQueue[P, V]) Reset() {
|
||||
q.queue[0] = newSstack[P, V](q.setIndex0)
|
||||
q.queue[1] = newSstack[P, V](q.setIndex1)
|
||||
q.indexOffset = 0
|
||||
}
|
||||
|
||||
// Refresh performs queue re-evaluation if necessary
|
||||
|
|
|
|||
Loading…
Reference in a new issue