filter

package
v0.0.0-...-3f8eaf4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Overview

Package filter provides filtering and sorting options to the various RPC query methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppearanceFilter

type AppearanceFilter struct {
	OuterBounds base.BlockRange

	Reversed bool

	BlocksOnly bool
	// contains filtered or unexported fields
}

func NewEmptyFilter

func NewEmptyFilter() *AppearanceFilter

func NewFilter

func NewFilter(reversed, reverted bool, fourBytes []string, exportRange base.BlockRange, recordRange base.RecordRange) *AppearanceFilter

func (*AppearanceFilter) ApplyCountFilter

func (f *AppearanceFilter) ApplyCountFilter() (passed, finished bool)

ApplyCountFilter checks to see if the appearance is at or later than the --first_record and less than (because it's zero-based) --max_records.

func (*AppearanceFilter) ApplyFilter

func (f *AppearanceFilter) ApplyFilter(app *index.AppearanceRecord) (passed, finished bool)

ApplyFilter checks to see if the appearance intersects with the user-supplied --first_block/--last_block pair (if any)

func (*AppearanceFilter) ApplyLogFilter

func (f *AppearanceFilter) ApplyLogFilter(log *types.SimpleLog, addrArray []base.Address) bool

func (*AppearanceFilter) ApplyRangeFilter

func (f *AppearanceFilter) ApplyRangeFilter(app *index.AppearanceRecord) (passed, finished bool)

ApplyRangeFilter checks to see if the appearance intersects with the user-supplied --first_block/--last_block pair (if any)

func (*AppearanceFilter) ApplyTxFilters

func (f *AppearanceFilter) ApplyTxFilters(tx *types.SimpleTransaction) (passed, finished bool)

ApplyTxFilters applies other filters such as the four byte and reverted filters.

func (*AppearanceFilter) GetOuterBounds

func (f *AppearanceFilter) GetOuterBounds() base.BlockRange

func (*AppearanceFilter) Reset

func (f *AppearanceFilter) Reset()

func (*AppearanceFilter) SetSort

func (f *AppearanceFilter) SetSort(sortBy AppearanceSort)

func (*AppearanceFilter) Sort

func (f *AppearanceFilter) Sort(fromDisc []index.AppearanceRecord)

type AppearanceSort

type AppearanceSort int
const (
	NotSorted AppearanceSort = iota
	Sorted
	Reversed
)

Jump to

Keyboard shortcuts

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