Patch for concurrent iterator & others (onto v1.11.6) #386
@ -45,6 +45,7 @@ func (h *nonceHeap) Pop() interface{} {
|
|||||||
old := *h
|
old := *h
|
||||||
n := len(old)
|
n := len(old)
|
||||||
x := old[n-1]
|
x := old[n-1]
|
||||||
|
old[n-1] = 0
|
||||||
*h = old[0 : n-1]
|
*h = old[0 : n-1]
|
||||||
return x
|
return x
|
||||||
}
|
}
|
||||||
|
@ -508,6 +508,7 @@ func (s *TxByPriceAndTime) Pop() interface{} {
|
|||||||
old := *s
|
old := *s
|
||||||
n := len(old)
|
n := len(old)
|
||||||
x := old[n-1]
|
x := old[n-1]
|
||||||
|
old[n-1] = nil
|
||||||
*s = old[0 : n-1]
|
*s = old[0 : n-1]
|
||||||
return x
|
return x
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,7 @@ func (h *expHeap) Pop() interface{} {
|
|||||||
old := *h
|
old := *h
|
||||||
n := len(old)
|
n := len(old)
|
||||||
x := old[n-1]
|
x := old[n-1]
|
||||||
|
old[n-1] = expItem{}
|
||||||
*h = old[0 : n-1]
|
*h = old[0 : n-1]
|
||||||
return x
|
return x
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user