From dce9c0c369bdaaab0d48808ea6032461224c66ff Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 21 Jan 2024 05:40:29 +0800 Subject: [PATCH] remove a redundant heap Init --- core/txpool/legacypool/list.go | 1 - 1 file changed, 1 deletion(-) diff --git a/core/txpool/legacypool/list.go b/core/txpool/legacypool/list.go index 05ae0b58cd..2b3bde6384 100644 --- a/core/txpool/legacypool/list.go +++ b/core/txpool/legacypool/list.go @@ -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()