filters

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2016 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

package filters implements an ethereum filtering system for block, transactions and log events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountChange added in v1.3.1

type AccountChange struct {
	Address, StateAddress []byte
}

type Filter

type Filter struct {
	BlockCallback       func(*types.Block, vm.Logs)
	TransactionCallback func(*types.Transaction)
	LogsCallback        func(vm.Logs)
	// contains filtered or unexported fields
}

Filtering interface

func New added in v1.3.1

func New(db ethdb.Database) *Filter

Create a new filter which uses a bloom filter on blocks to figure out whether a particular block is interesting or not.

func (*Filter) FilterLogs added in v1.3.1

func (self *Filter) FilterLogs(logs vm.Logs) vm.Logs

func (*Filter) Find added in v1.3.1

func (self *Filter) Find() vm.Logs

Run filters logs with the current parameters set

func (*Filter) SetAddresses added in v1.3.1

func (self *Filter) SetAddresses(addr []common.Address)

func (*Filter) SetBeginBlock added in v1.3.1

func (self *Filter) SetBeginBlock(begin int64)

Set the earliest and latest block for filtering. -1 = latest block (i.e., the current block) hash = particular hash from-to

func (*Filter) SetEndBlock added in v1.3.1

func (self *Filter) SetEndBlock(end int64)

func (*Filter) SetTopics added in v1.3.1

func (self *Filter) SetTopics(topics [][]common.Hash)

type FilterSystem added in v1.3.1

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

FilterSystem manages filters that filter specific events such as block, transaction and log events. The Filtering system can be used to listen for specific LOG events fired by the EVM (Ethereum Virtual Machine).

func NewFilterSystem added in v1.3.1

func NewFilterSystem(mux *event.TypeMux) *FilterSystem

NewFilterSystem returns a newly allocated filter manager

func (*FilterSystem) Add added in v1.3.1

func (fs *FilterSystem) Add(filter *Filter) (id int)

Add adds a filter to the filter manager

func (*FilterSystem) Get added in v1.3.1

func (fs *FilterSystem) Get(id int) *Filter

Get retrieves a filter installed using Add The filter may not be modified.

func (*FilterSystem) Remove added in v1.3.1

func (fs *FilterSystem) Remove(id int)

Remove removes a filter by filter id

func (*FilterSystem) Stop added in v1.3.1

func (fs *FilterSystem) Stop()

Stop quits the filter loop required for polling events

Jump to

Keyboard shortcuts

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