core: rename parameter filter to filterFun for readability

This commit is contained in:
wit 2025-10-27 17:39:33 +08:00
parent 447b5f7e19
commit 905b0b981a

View file

@ -134,12 +134,12 @@ func (m *SortedMap) reheap() {
// filter is identical to Filter, but **does not** regenerate the heap. This method
// should only be used if followed immediately by a call to Filter or reheap()
func (m *SortedMap) filter(filter func(*types.Transaction) bool) types.Transactions {
func (m *SortedMap) filter(filterFun func(*types.Transaction) bool) types.Transactions {
var removed types.Transactions
// Collect all the transactions to filter out
for nonce, tx := range m.items {
if filter(tx) {
if filterFun(tx) {
removed = append(removed, tx)
delete(m.items, nonce)
}