diff --git a/core/txpool/legacypool/list.go b/core/txpool/legacypool/list.go index c0efa3f20a..539c0c95ae 100644 --- a/core/txpool/legacypool/list.go +++ b/core/txpool/legacypool/list.go @@ -125,6 +125,9 @@ func (m *SortedMap) Filter(filter func(*types.Transaction) bool) types.Transacti func (m *SortedMap) reheap() { *m.index = slices.Collect(maps.Keys(m.items)) heap.Init(m.index) + m.cacheMu.Lock() + m.cache = nil + m.cacheMu.Unlock() } // filter is identical to Filter, but **does not** regenerate the heap. This method