logfilter

package
v1.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

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