localdb

package
v0.0.0-...-93382e6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockKey

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

func GetRootByRootCM

func GetRootByRootCM(db decedb.Getter, root_cm *c_type.Uint256) (root *c_type.Uint256)

func HashIndexAr

func HashIndexAr(index uint64) (ret c_type.Uint256)

func HashIndexRsk

func HashIndexRsk(index uint64) (ret c_type.Uint256)

func PkgKey

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

func PutBlock

func PutBlock(db decedb.Putter, num uint64, hash *c_type.Uint256, block *Block)

func PutPkg

func PutPkg(db decedb.Putter, hash *c_type.Uint256, pkg *ZPkg)

func PutRoot

func PutRoot(db decedb.Putter, root *c_type.Uint256, rs *RootState)

func Root2TxHashKey

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

func RootCM2RootKey

func RootCM2RootKey(root_cm *c_type.Uint256) []byte

func UpdateOutStat

func UpdateOutStat(db decedb.Putter, root *c_type.Uint256, os *OutStat)

Types

type Block

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

func GetBlock

func GetBlock(db decedb.Database, num uint64, hash *c_type.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 decedb.Getter, root *c_type.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_P  *tx.Out_P       `rlp:"nil"`
	Out_C  *tx.Out_C       `rlp:"nil"`
	OutCM  *c_type.Uint256 `rlp:"nil"`
	RootCM *c_type.Uint256 `rlp:"nil"`
}

func (*OutState) Clone

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

func (*OutState) GenRootCM

func (self *OutState) GenRootCM()

func (*OutState) IsSzk

func (out *OutState) IsSzk() bool

func (*OutState) IsZero

func (out *OutState) IsZero() bool

func (*OutState) Serial

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

func (*OutState) ToPKr

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

func (*OutState) TxType

func (out *OutState) TxType() string

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 c_type.Uint256
	Num    uint64
}

func GetRoot

func GetRoot(db decedb.Getter, root *c_type.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   c_type.PKr
	Pack   stx.PkgCreate
	Closed bool
}

func GetPkg

func GetPkg(db decedb.Getter, hash *c_type.Uint256) (ret *ZPkg)

func (*ZPkg) Serial

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

func (*ZPkg) ToHash

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

Jump to

Keyboard shortcuts

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