remove a redundant heap Init

This commit is contained in:
colinlyguo 2024-01-21 05:40:29 +08:00
parent f55a10b64d
commit dce9c0c369
No known key found for this signature in database
GPG key ID: 82E123BE1B68288B

View file

@ -166,7 +166,6 @@ func (m *sortedMap) Cap(threshold int) types.Transactions {
delete(m.items, (*m.index)[size-1])
}
*m.index = (*m.index)[:threshold]
heap.Init(m.index)
// If we had a cache, shift the back
m.cacheMu.Lock()