localdb

package
v1.0.0-rc2-review Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2019 License: GPL-3.0 Imports: 10 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockKey

func BlockKey(num uint64, hash *keys.Uint256) []byte

func OutKey

func OutKey(root *keys.Uint256) []byte

func PkgKey

func PkgKey(root *keys.Uint256) []byte

func PutBlock

func PutBlock(db serodb.Putter, num uint64, hash *keys.Uint256, block *Block)

func PutPkg

func PutPkg(db serodb.Putter, hash *keys.Uint256, pkg *ZPkg)

func PutRoot

func PutRoot(db serodb.Putter, root *keys.Uint256, rs *RootState)

func Root2TxHashKey

func Root2TxHashKey(root *keys.Uint256) []byte

func UpdateOutStat

func UpdateOutStat(db serodb.Putter, root *keys.Uint256, os *OutStat)

Types

type Block

type Block struct {
	Roots []keys.Uint256
	Dels  []keys.Uint256
	Pkgs  []keys.Uint256
}

func GetBlock

func GetBlock(db serodb.Database, num uint64, hash *keys.Uint256) (ret *Block)

func (*Block) Serial

func (self *Block) Serial() (ret []byte, e error)

type BlockGet

type BlockGet struct {
	Out *Block
}

func (*BlockGet) Unserial

func (self *BlockGet) Unserial(v []byte) (e error)

type OutStat

type OutStat struct {
	Time  int64
	Value utils.U256
	Z     bool
}

func GetOutStat

func GetOutStat(db serodb.Getter, root *keys.Uint256) (ret *OutStat)

func (*OutStat) Serial

func (self *OutStat) Serial() (ret []byte, e error)

type OutStatGet

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

func (*OutStatGet) Unserial

func (self *OutStatGet) Unserial(v []byte) (e error)

type OutState

type OutState struct {
	Index  uint64
	Out_O  *stx.Out_O    `rlp:"nil"`
	Out_Z  *stx.Out_Z    `rlp:"nil"`
	OutCM  *keys.Uint256 `rlp:"nil"`
	RootCM *keys.Uint256 `rlp:"nil"`
}

func (*OutState) Clone

func (self *OutState) Clone() (ret OutState)

func (*OutState) IsO

func (out *OutState) IsO() bool

func (*OutState) Serial

func (self *OutState) Serial() (ret []byte, e error)

func (*OutState) ToIndexRsk

func (self *OutState) ToIndexRsk() (ret keys.Uint256)

func (*OutState) ToOutCM

func (self *OutState) ToOutCM() *keys.Uint256

func (*OutState) ToPKr

func (self *OutState) ToPKr() *keys.PKr

func (*OutState) ToRootCM

func (self *OutState) ToRootCM() *keys.Uint256

type OutState0Get

type OutState0Get struct {
	Out *OutState
}

func (*OutState0Get) Unserial

func (self *OutState0Get) Unserial(v []byte) (e error)

type PkgGet

type PkgGet struct {
	Out *ZPkg
}

func (*PkgGet) Unserial

func (self *PkgGet) Unserial(v []byte) (e error)

type RootState

type RootState struct {
	OS     OutState
	TxHash keys.Uint256
	Num    uint64
}

func GetRoot

func GetRoot(db serodb.Getter, root *keys.Uint256) (ret *RootState)

func (*RootState) Serial

func (self *RootState) Serial() (ret []byte, e error)

type RootStateGet

type RootStateGet struct {
	Out *RootState
}

func (*RootStateGet) Unserial

func (self *RootStateGet) Unserial(v []byte) (e error)

type ZPkg

type ZPkg struct {
	High   uint64
	From   keys.PKr
	Pack   stx.PkgCreate
	Closed bool
}

func GetPkg

func GetPkg(db serodb.Getter, hash *keys.Uint256) (ret *ZPkg)

func (*ZPkg) Serial

func (self *ZPkg) Serial() (ret []byte, e error)

func (*ZPkg) ToHash

func (self *ZPkg) ToHash() (ret keys.Uint256)

Jump to

Keyboard shortcuts

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