localdb

package
v1.0.3-rc3 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: GPL-3.0 Imports: 16 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 axisdb.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 axisdb.Putter, num uint64, hash *c_type.Uint256, block *Block)

func PutPkg

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

func PutRoot

func PutRoot(db axisdb.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 SetOSForVersion0

func SetOSForVersion0(b *OutState, v0 *OutState_Version0)

func SetOSForVersion1

func SetOSForVersion1(b *OutState, v1 *OutState_Version1)

func SetVersion0ForOS

func SetVersion0ForOS(v0 *OutState_Version0, b *OutState)

func SetVersion1ForOS

func SetVersion1ForOS(v1 *OutState_Version1, b *OutState)

func UpdateOutStat

func UpdateOutStat(db axisdb.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 axisdb.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 axisdb.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_O  *stx_v0.Out_O   `rlp:"nil"`
	Out_Z  *stx_v0.Out_Z   `rlp:"nil"`
	Out_P  *stx_v1.Out_P   `rlp:"nil"`
	Out_C  *stx_v1.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) DecodeRLP

func (b *OutState) DecodeRLP(s *rlp.Stream) error

func (*OutState) EncodeRLP

func (b *OutState) EncodeRLP(w io.Writer) error

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) TryGetOutCM

func (self *OutState) TryGetOutCM() (ret *c_type.Uint256)

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 OutState_Version0

type OutState_Version0 struct {
	Index  uint64
	Out_O  *stx_v0.Out_O   `rlp:"nil"`
	Out_Z  *stx_v0.Out_Z   `rlp:"nil"`
	OutCM  *c_type.Uint256 `rlp:"nil"`
	RootCM *c_type.Uint256 `rlp:"nil"`
}

type OutState_Version1

type OutState_Version1 struct {
	Out_P *stx_v1.Out_P `rlp:"nil"`
	Out_C *stx_v1.Out_C `rlp:"nil"`
}

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 axisdb.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 axisdb.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