storage

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadgerLogger

type BadgerLogger struct {
	*logging.Logger
}

BadgerLogger is a wrapper type to give our logger the expected interface

func NewBadgerLogger

func NewBadgerLogger() *BadgerLogger

func (*BadgerLogger) Warningf

func (b *BadgerLogger) Warningf(msg string, args ...any)

type Storage

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

func GetStorage

func GetStorage() *Storage

func (*Storage) AddUtxo

func (s *Storage) AddUtxo(
	address string,
	txId string,
	txOutIdx uint32,
	txOutBytes []byte,
) error

func (*Storage) GetBlockData

func (s *Storage) GetBlockData(dest any) error

func (*Storage) GetCursor

func (s *Storage) GetCursor() (uint64, string, error)

func (*Storage) GetUtxos

func (s *Storage) GetUtxos(address string) ([][]byte, error)

func (*Storage) Load

func (s *Storage) Load() error

func (*Storage) RemoveUtxo

func (s *Storage) RemoveUtxo(
	address string,
	txId string,
	utxoIdx uint32,
) error

func (*Storage) UpdateBlockData

func (s *Storage) UpdateBlockData(blockData any) error

func (*Storage) UpdateCursor

func (s *Storage) UpdateCursor(slotNumber uint64, blockHash string) error

Jump to

Keyboard shortcuts

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