utxo

package
v0.0.0-...-4ccbfa9 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2015 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_UTXO byte = iota
	DB_ADDR
	DB_HEIGHT
	DB_MAX
)

Variables

This section is empty.

Functions

func DeserializeOutPoint

func DeserializeOutPoint(buf []byte) *btcwire.OutPoint

func FetchHeight

func FetchHeight(db *leveldb.DB) (topHeight uint32, topTime time.Time, err error)

func FetchHeightFile

func FetchHeightFile(dbDir string) (topHeight uint32, topTime time.Time, err error)

func FetchOutPoints

func FetchOutPoints(db *leveldb.DB, addr *btcutil.AddressPubKeyHash, count, skip uint) (outPoints []*btcwire.OutPoint, complete bool, err error)

func SerializeOutPoint

func SerializeOutPoint(outPoint *btcwire.OutPoint) []byte

func SerializeUTXO

func SerializeUTXO(utxo *UTXO) []byte

Types

type UTXO

type UTXO struct {
	BlockTime     uint32
	StakeModifier uint64
	OffsetInBlock uint32
	Time          uint32
	Value         uint64
	PkScript      []byte
}

func DeserializeUTXO

func DeserializeUTXO(buf []byte) *UTXO

func FetchCoins

func FetchCoins(db *leveldb.DB, addr *btcutil.AddressPubKeyHash) ([]*btcwire.OutPoint, []*UTXO, error)

func FetchUTXO

func FetchUTXO(db *leveldb.DB, outPoint *btcwire.OutPoint) (*UTXO, error)

Jump to

Keyboard shortcuts

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