slpgraphsearch

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: ISC Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Db manages slp token graphs for graph search and TODO: recently queried items

func NewDb

func NewDb() *Db

NewDb creates a new instance of SlpCache

func (*Db) AddTxn

func (gs *Db) AddTxn(msgTx *wire.MsgTx) error

AddTxn adds a transaction to the graph search database

func (*Db) Find

func (gs *Db) Find(hash *chainhash.Hash, tokenID *chainhash.Hash, validityCache *map[chainhash.Hash]struct{}) ([][]byte, error)

Find performs a graph search for a given transaction hash

func (*Db) IsLoaded

func (gs *Db) IsLoaded() bool

IsLoaded indicates the db is initially loaded and can be used internally

func (*Db) IsReady

func (gs *Db) IsReady() bool

IsReady indicates the db is loaded and ready for client queries

func (*Db) SetLoaded

func (gs *Db) SetLoaded() error

SetLoaded allows external callers to determine when all of the graph search db has been loaded

func (*Db) SetReady

func (gs *Db) SetReady() error

SetReady allows external callers to determine when the graph search db is ready for use

Jump to

Keyboard shortcuts

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