mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
Merge e0989cdff4 into 12eabbd76d
This commit is contained in:
commit
619e982ca3
2 changed files with 6 additions and 1 deletions
|
|
@ -94,6 +94,11 @@ func NewFilterSystem(backend Backend, config Config) *FilterSystem {
|
|||
}
|
||||
}
|
||||
|
||||
// RangeLimit returns the configured maximum block range for filter queries.
|
||||
func (sys *FilterSystem) RangeLimit() uint64 {
|
||||
return sys.cfg.RangeLimit
|
||||
}
|
||||
|
||||
type logCacheElem struct {
|
||||
logs []*types.Log
|
||||
body atomic.Pointer[types.Body]
|
||||
|
|
|
|||
|
|
@ -1445,7 +1445,7 @@ func (r *Resolver) Logs(ctx context.Context, args struct{ Filter FilterCriteria
|
|||
topics = *args.Filter.Topics
|
||||
}
|
||||
// Construct the range filter
|
||||
filter := r.filterSystem.NewRangeFilter(begin, end, addresses, topics, 0)
|
||||
filter := r.filterSystem.NewRangeFilter(begin, end, addresses, topics, r.filterSystem.RangeLimit())
|
||||
return runFilter(ctx, r, filter)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue