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
+2 -2
View File
@@ -24,7 +24,7 @@ import (
"runtime"
"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/math"
"github.com/ethereum/go-ethereum/consensus"
@@ -214,7 +214,7 @@ func (ethash *Ethash) VerifyUncles(chain consensus.ChainReader, block *types.Blo
return nil
}
// Gather the set of past uncles and ancestors
uncles, ancestors := mapset.NewSet(), make(map[common.Hash]*types.Header)
uncles, ancestors := mapset.NewSet[common.Hash](), make(map[common.Hash]*types.Header)
number, parent := block.NumberU64()-1, block.ParentHash()
for i := 0; i < 7; i++ {