utxoindex

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: ISC Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScriptPublicKeyString

type ScriptPublicKeyString string

ScriptPublicKeyString is a script public key represented as a string We use this type rather than just a byte slice because Go maps don't support slices as keys. See: UTXOChanges

type UTXOChanges

UTXOChanges is the set of changes made to the UTXO index after a successful update

type UTXOIndex

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

UTXOIndex maintains an index between transaction scriptPublicKeys and UTXOs

func New

func New(domain domain.Domain, database database.Database) (*UTXOIndex, error)

New creates a new UTXO index.

NOTE: While this is called no new blocks can be added to the consensus.

func (*UTXOIndex) GetCirculatingLeorSupply

func (ui *UTXOIndex) GetCirculatingLeorSupply() (uint64, error)

GetCirculatingLeorSupply returns the current circulating supply of leors in the network

func (*UTXOIndex) Reset

func (ui *UTXOIndex) Reset() error

Reset deletes the whole UTXO index and resyncs it from consensus.

func (*UTXOIndex) UTXOs

func (ui *UTXOIndex) UTXOs(scriptPublicKey *externalapi.ScriptPublicKey) (UTXOOutpointEntryPairs, error)

UTXOs returns all the UTXOs for the given scriptPublicKey

func (*UTXOIndex) Update

func (ui *UTXOIndex) Update(virtualChangeSet *externalapi.VirtualChangeSet) (*UTXOChanges, error)

Update updates the UTXO index with the given DAG selected parent chain changes

type UTXOOutpointEntryPairs

type UTXOOutpointEntryPairs map[externalapi.DomainOutpoint]externalapi.UTXOEntry

UTXOOutpointEntryPairs is a map between UTXO outpoints to UTXO entries

type UTXOOutpoints

type UTXOOutpoints map[externalapi.DomainOutpoint]interface{}

UTXOOutpoints is a set of UTXO outpoints

Jump to

Keyboard shortcuts

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