merkle

package
v1.0.2-rc1-dev-review Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const DEPTH = c_type.DEPTH

Variables

This section is empty.

Functions

This section is empty.

Types

type CombinFunc

type CombinFunc func(*c_type.Uint256, *c_type.Uint256) (out c_type.Uint256)

type Leaf

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

type MerkleTree

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

func (*MerkleTree) AppendLeaf

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

func (*MerkleTree) GetLeafSize

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

func (*MerkleTree) GetPaths

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

type Param

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

func NewParam

func NewParam(obj *c_type.PKr, combine CombinFunc) (ret Param)

func (*Param) CalcRoot

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

func (*Param) EmptyRoots

func (self *Param) EmptyRoots() []c_type.Uint256

func (*Param) NewMerkleTree

func (self *Param) NewMerkleTree(db tri.Tri) (ret MerkleTree)

Jump to

Keyboard shortcuts

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