filterdefault

package
v0.0.0-...-bda353b Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package filterdefault transaction filter implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxFilter

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

TxFilter protocol.BlockchainStore transaction filter

func New

func New(store protocol.BlockchainStore) *TxFilter

New transaction filter init

func (TxFilter) Add

func (f TxFilter) Add(_ string) error

Add txId to transaction filter

func (TxFilter) Adds

func (f TxFilter) Adds(_ []string) error

Adds batch Add txId

func (TxFilter) AddsAndSetHeight

func (f TxFilter) AddsAndSetHeight(_ []string, _ uint64) error

AddsAndSetHeight batch add tx id and set height

func (TxFilter) Close

func (f TxFilter) Close()

Close transaction filter

func (TxFilter) GetHeight

func (f TxFilter) GetHeight() uint64

GetHeight get height from transaction filter

func (TxFilter) IsExists

func (f TxFilter) IsExists(txId string, _ ...birdsnest.RuleType) (bool, *txfilter.Stat, error)

IsExists Check whether TxId exists in the transaction filter

func (TxFilter) IsExistsAndReturnHeight

func (f TxFilter) IsExistsAndReturnHeight(txId string, _ ...birdsnest.RuleType) (bool, uint64, *txfilter.Stat, error)

IsExistsAndReturnHeight is exists and return height

func (TxFilter) SetHeight

func (f TxFilter) SetHeight(_ uint64)

SetHeight set height from transaction filter

func (TxFilter) ValidateRule

func (f TxFilter) ValidateRule(_ string, _ ...birdsnest.RuleType) error

ValidateRule validate transaction rules

Jump to

Keyboard shortcuts

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