zstate

package
v0.3.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: GPL-3.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

View Source
const BLOCK_NAME = "ZState0_BLOCK"
View Source
const LAST_OUTSTATE0_NAME = tri.KEY_NAME("ZState0_Cur")

Variables

This section is empty.

Functions

func Debug_State0_addout_assert

func Debug_State0_addout_assert(state *State0, os *OutState0)

func Debug_Weak_panic

func Debug_Weak_panic(msg string, ctx ...interface{})

func Need_debug

func Need_debug() bool

Types

type Current

type Current struct {
	Index int64
	Tree  merkle.Tree
}

func NewCur

func NewCur() (ret Current)

func (*Current) Serial

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

type CurrentGet

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

func (*CurrentGet) Unserial

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

type OutState0

type OutState0 struct {
	Index uint64
	Out_O *stx.Out_O `rlp:"nil"`
	Out_Z *stx.Out_Z `rlp:"nil"`
}

func (*OutState0) Clone

func (self *OutState0) Clone() (ret OutState0)

func (*OutState0) IsO

func (out *OutState0) IsO() bool

func (*OutState0) Serial

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

func (*OutState0) ToOutCM

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

func (*OutState0) ToRootCM

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

type OutState0Get

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

func (*OutState0Get) Unserial

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

type State

type State struct {
	State0
}

func NewState

func NewState(tri0 tri.Tri, num uint64) (state *State)

func (*State) AddOut_O

func (state *State) AddOut_O(out *stx.Out_O)

func (*State) AddStx

func (state *State) AddStx(st *stx.T) (e error)

func (*State) AddTxOut

func (state *State) AddTxOut(addr common.Address, asset assets.Asset)

func (*State) Copy

func (self *State) Copy() *State

func (*State) Revert

func (self *State) Revert()

func (*State) Update

func (self *State) Update()

type State0

type State0 struct {
	Cur    Current
	Block  State0Block
	G2ins  map[keys.Uint256]bool
	G2outs map[keys.Uint256]*OutState0
	// contains filtered or unexported fields
}

func NewState0

func NewState0(tri tri.Tri, num uint64) (state State0)

func (*State0) AddOut

func (state *State0) AddOut(out_o *stx.Out_O, out_z *stx.Out_Z) (root keys.Uint256)

func (*State0) AddStx

func (state *State0) AddStx(st *stx.T) (e error)

func (*State0) GenState0Trees

func (state *State0) GenState0Trees() (ret State0Trees)

func (*State0) GetOut

func (state *State0) GetOut(root *keys.Uint256) (src *OutState0, e error)

func (*State0) HasIn

func (self *State0) HasIn(hash *keys.Uint256) (exists bool)

func (*State0) Name2BKey

func (self *State0) Name2BKey(name string, num uint64) (ret []byte)

func (*State0) Num

func (self *State0) Num() uint64

func (*State0) Revert

func (self *State0) Revert()

func (*State0) Tri

func (self *State0) Tri() tri.Tri

func (*State0) Update

func (self *State0) Update()

type State0Block

type State0Block struct {
	Tree        *merkle.Tree `rlp:"nil"`
	Commitments []keys.Uint256
	Dels        []keys.Uint256
}

func (*State0Block) Serial

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

type State0BlockGet

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

func (*State0BlockGet) Unserial

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

type State0Trees

type State0Trees struct {
	Trees       map[uint64]merkle.Tree
	Roots       []keys.Uint256
	Start_index uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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