sidefilter

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	bloom.TxFilter
	// contains filtered or unexported fields
}

Filter defines the side filter instance, it implements the TxFilter interface.

func New

func New(state *state.State) *Filter

New returns a new Filter instance.

func (*Filter) Add

func (f *Filter) Add(data []byte) error

Add adds new data into filter.

func (*Filter) Load

func (f *Filter) Load(filter []byte) error

Load loads the transaction filter.

func (*Filter) MatchConfirmed

func (f *Filter) MatchConfirmed(tx *types.Transaction) bool

MatchConfirmed returns if a confirmed (packed into a block) transaction matches the filter.

func (*Filter) MatchUnconfirmed

func (f *Filter) MatchUnconfirmed(tx *types.Transaction) bool

MatchUnconfirmed returns if a unconfirmed (not packed into a block yet) transaction matches the filter.

Jump to

Keyboard shortcuts

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