From f27166ce9422557aaebf498b290260387d30e978 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 17 Mar 2025 15:35:31 +0100 Subject: [PATCH] all: remove unnecessary type arguments for NewRange --- core/filtermaps/filtermaps.go | 14 +++++++------- eth/filters/filter.go | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/filtermaps/filtermaps.go b/core/filtermaps/filtermaps.go index 390932313a..fe75c1ea7d 100644 --- a/core/filtermaps/filtermaps.go +++ b/core/filtermaps/filtermaps.go @@ -202,8 +202,8 @@ func NewFilterMaps(db ethdb.KeyValueStore, initView *ChainView, historyCutoff, f initialized: initialized, headIndexed: rs.HeadIndexed, headDelimiter: rs.HeadDelimiter, - blocks: common.NewRange[uint64](rs.BlocksFirst, rs.BlocksAfterLast-rs.BlocksFirst), - maps: common.NewRange[uint32](rs.MapsFirst, rs.MapsAfterLast-rs.MapsFirst), + blocks: common.NewRange(rs.BlocksFirst, rs.BlocksAfterLast-rs.BlocksFirst), + maps: common.NewRange(rs.MapsFirst, rs.MapsAfterLast-rs.MapsFirst), tailPartialEpoch: rs.TailPartialEpoch, }, matcherSyncCh: make(chan *FilterMapsMatcherBackend), @@ -327,8 +327,8 @@ func (f *FilterMaps) init() error { } if bestLen > 0 { cp := checkpoints[bestIdx][bestLen-1] - fmr.blocks = common.NewRange[uint64](cp.BlockNumber+1, 0) - fmr.maps = common.NewRange[uint32](uint32(bestLen)< s.searchRange.First(): // we have results but tail section is missing; do unindexed search for // the tail part but still allow indexed search for missing head section - tailRange := common.NewRange[uint64](s.searchRange.First(), s.matchRange.First()-s.searchRange.First()) + tailRange := common.NewRange(s.searchRange.First(), s.matchRange.First()-s.searchRange.First()) tailMatches, err := s.searchInRange(tailRange, false) if err != nil { return err @@ -307,7 +307,7 @@ func (s *searchSession) doSearchIteration() error { case !s.matchRange.IsEmpty() && s.matchRange.First() == s.searchRange.First() && s.searchRange.AfterLast() > s.matchRange.AfterLast(): // we have results but head section is missing - headRange := common.NewRange[uint64](s.matchRange.AfterLast(), s.searchRange.AfterLast()-s.matchRange.AfterLast()) + headRange := common.NewRange(s.matchRange.AfterLast(), s.searchRange.AfterLast()-s.matchRange.AfterLast()) if !s.forceUnindexed { indexedHeadRange := headRange.Intersection(s.syncRange.IndexedBlocks) if !indexedHeadRange.IsEmpty() && indexedHeadRange.First() == headRange.First() {