txstate

package
v1.0.0-rc13 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: GPL-3.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

View Source
const DEPTH = cpt.DEPTH

Variables

This section is empty.

Functions

func AnalyzeNils

func AnalyzeNils(header *types.Header, ch Chain)

func CalcRoot

func CalcRoot(value *keys.Uint256, pos uint64, paths *[DEPTH]keys.Uint256) (ret keys.Uint256)

func Combine

func Combine(l *keys.Uint256, r *keys.Uint256) (out keys.Uint256)

func Debug_Weak_panic

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

func Need_debug

func Need_debug() bool

Types

type Chain

type Chain interface {
	GetBlock(hash common.Hash, number uint64) *types.Block
}

type Leaf

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

type MerkleTree

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

func NewMerkleTree

func NewMerkleTree(db tri.Tri) (ret MerkleTree)

func (*MerkleTree) AppendLeaf

func (self *MerkleTree) AppendLeaf(value keys.Uint256) keys.Uint256

func (*MerkleTree) GetLeafSize

func (self *MerkleTree) GetLeafSize() (ret uint64)

func (*MerkleTree) GetPaths

func (self *MerkleTree) GetPaths(value keys.Uint256) (pos uint64, paths [DEPTH]keys.Uint256, anchor keys.Uint256)

type State

type State struct {
	MTree MerkleTree
	// contains filtered or unexported fields
}

func NewState

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

func (*State) AddDel_Log

func (self *State) AddDel_Log(in *keys.Uint256)

func (*State) AddNil_Log

func (self *State) AddNil_Log(in *keys.Uint256)

func (*State) AddOut

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

func (*State) AddOut_Log

func (self *State) AddOut_Log(root *keys.Uint256, out *localdb.OutState, txhash *keys.Uint256)

func (*State) AddStx

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

func (*State) AddTxOut_Log

func (self *State) AddTxOut_Log(pkr *keys.PKr) int

func (*State) GetBlockDels

func (self *State) GetBlockDels() (dels []keys.Uint256)

func (*State) GetBlockRoots

func (self *State) GetBlockRoots() (roots []keys.Uint256)

func (*State) GetOut

func (state *State) GetOut(root *keys.Uint256) (src *localdb.OutState)

func (*State) HasIn

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

func (*State) Num

func (self *State) Num() uint64

func (*State) PreGenerateRoot

func (self *State) PreGenerateRoot(header *types.Header, ch Chain)

func (*State) RecordState

func (self *State) RecordState(putter serodb.Putter, root *keys.Uint256)

func (*State) Revert

func (state *State) Revert(revid int)

func (*State) Snapshot

func (state *State) Snapshot(revid int)

func (*State) Tri

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

func (*State) Update

func (self *State) Update()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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