_map

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: 3 Imported by: 0

Documentation

Overview

Package mapimpl 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 sync.Map transaction filter

func New

func New() *TxFilter

New transaction filter init

func (*TxFilter) Add

func (f *TxFilter) Add(txId string) error

Add txId to transaction filter

func (*TxFilter) Adds

func (f *TxFilter) Adds(txIds []string) error

Adds batch Add txId

func (*TxFilter) AddsAndSetHeight

func (f *TxFilter) AddsAndSetHeight(txId []string, height 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, _ ...bn.RuleType) (bool, *txfilter.Stat, error)

IsExists Check whether TxId exists in the transaction filter

func (*TxFilter) IsExistsAndReturnHeight

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

IsExistsAndReturnHeight is exists and return height

func (*TxFilter) SetHeight

func (f *TxFilter) SetHeight(height uint64)

SetHeight set height from transaction filter

func (*TxFilter) ValidateRule

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

ValidateRule validate rules

Jump to

Keyboard shortcuts

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