logfilter

package
v1.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// BlockHeightPrefix is an prefix which will concatenate with blocknumber when adding into rangeBloomFilter
	BlockHeightPrefix = "height"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LogFilter

type LogFilter struct {
	// contains filtered or unexported fields
}

LogFilter contains options for contract log filtering.

func NewLogFilter

func NewLogFilter(in *iotexapi.LogsFilter) *LogFilter

NewLogFilter returns a new log filter

func (*LogFilter) ExistInBloomFilter

func (l *LogFilter) ExistInBloomFilter(bf bloom.BloomFilter) bool

ExistInBloomFilter returns true if topics of filter exist in the bloom filter

func (*LogFilter) ExistInBloomFilterv2

func (l *LogFilter) ExistInBloomFilterv2(bf bloom.BloomFilter) bool

ExistInBloomFilterv2 returns true if addresses and topics of filter exist in the range bloom filter (topic: position-sensitive)

func (*LogFilter) MatchLogs

func (l *LogFilter) MatchLogs(receipts []*action.Receipt) []*action.Log

MatchLogs returns matching logs in a given block

func (*LogFilter) SelectBlocksFromRangeBloomFilter

func (l *LogFilter) SelectBlocksFromRangeBloomFilter(bf bloom.BloomFilter, start, end uint64) []uint64

SelectBlocksFromRangeBloomFilter filters out RangeBloomFilter for selecting block numbers which have logFilter's topics/address TODO[dorothy]: optimize using goroutine

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL