merkle

package
v0.3.1-beta.rc.5.hotfix.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEPTH = cpt.DEPTH
)

====================

Variables

This section is empty.

Functions

func NextDepth

func NextDepth(t Tree, skip uint) (ret uint)

func Size

func Size(t Tree) (ret uint)

Types

type Leaf

type Leaf keys.Uint256

func Combine

func Combine(l *Leaf, r *Leaf) (ret Leaf)

func EmptyRoots

func EmptyRoots() []Leaf

func GenLeaf

func GenLeaf() Leaf

func GetLeaf

func GetLeaf() Leaf

func Last

func Last(t Tree) (ret Leaf)

func (*Leaf) ToUint256

func (self *Leaf) ToUint256() (ret *keys.Uint256)

type Parent

type Parent struct {
	L *Leaf `rlp:"nil"`
}

type PathFiller

type PathFiller struct {
	list.List
}

func NewPathFilter

func NewPathFilter(leafs []Leaf) *PathFiller

func (*PathFiller) Next

func (pf *PathFiller) Next(depth uint) Leaf

func (*PathFiller) Push

func (pf *PathFiller) Push(leaf Leaf)

type Tree

type Tree struct {
	Left  *Leaf `rlp:"nil"`
	Right *Leaf `rlp:"nil"`
	Pats  []Parent
	// contains filtered or unexported fields
}

func (*Tree) Append

func (t *Tree) Append(l Leaf)

func (*Tree) Clone

func (t *Tree) Clone() (ret Tree)

func (*Tree) IsComplete

func (t *Tree) IsComplete() bool

func (*Tree) Root

func (tree *Tree) Root() Leaf

func (*Tree) RootKey

func (tree *Tree) RootKey() (ret keys.Uint256)

func (*Tree) TempIsComplete

func (t *Tree) TempIsComplete(depth uint) bool

func (*Tree) TempRoot

func (tree *Tree) TempRoot(partial *PathFiller, depth uint) Leaf

func (Tree) ToRef

func (t Tree) ToRef() *Tree

Jump to

Keyboard shortcuts

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