forked from cerc-io/plugeth
all: use github.com/deckarep/golang-set/v2 (generic set) (#26159)
Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
co-authored by
Felix Lange
parent
8c5ce1107b
commit
f58ebd9696
@@ -21,7 +21,7 @@ import (
|
||||
"math/rand"
|
||||
"sync"
|
||||
|
||||
mapset "github.com/deckarep/golang-set"
|
||||
mapset "github.com/deckarep/golang-set/v2"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/p2p"
|
||||
@@ -502,7 +502,7 @@ func (p *Peer) RequestTxs(hashes []common.Hash) error {
|
||||
|
||||
// knownCache is a cache for known hashes.
|
||||
type knownCache struct {
|
||||
hashes mapset.Set
|
||||
hashes mapset.Set[common.Hash]
|
||||
max int
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@ type knownCache struct {
|
||||
func newKnownCache(max int) *knownCache {
|
||||
return &knownCache{
|
||||
max: max,
|
||||
hashes: mapset.NewSet(),
|
||||
hashes: mapset.NewSet[common.Hash](),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user