all: use github.com/deckarep/golang-set/v2 (generic set) (#26159)

Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
Jolly Zhao
2022-11-14 15:16:52 +01:00
committed by GitHub
co-authored by Felix Lange
parent 8c5ce1107b
commit f58ebd9696
10 changed files with 71 additions and 42 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ import (
"sort"
"time"
mapset "github.com/deckarep/golang-set"
mapset "github.com/deckarep/golang-set/v2"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/mclock"
"github.com/ethereum/go-ethereum/core/txpool"
@@ -148,7 +148,7 @@ type TxFetcher struct {
drop chan *txDrop
quit chan struct{}
underpriced mapset.Set // Transactions discarded as too cheap (don't re-fetch)
underpriced mapset.Set[common.Hash] // Transactions discarded as too cheap (don't re-fetch)
// Stage 1: Waiting lists for newly discovered transactions that might be
// broadcast without needing explicit request/reply round trips.
@@ -202,7 +202,7 @@ func NewTxFetcherForTests(
fetching: make(map[common.Hash]string),
requests: make(map[string]*txRequest),
alternates: make(map[common.Hash]map[string]struct{}),
underpriced: mapset.NewSet(),
underpriced: mapset.NewSet[common.Hash](),
hasTx: hasTx,
addTxs: addTxs,
fetchTxs: fetchTxs,