hashable

package
v0.0.0-...-87d874c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidProofError = avl.NewWrapError("invalid proof")
)

Functions

func SetTreeNodeHash

func SetTreeNodeHash(node HashableMutableNode, hashFunc NodeHashFunc) error

Types

type HashableMutableNode

type HashableMutableNode interface {
	avl.MutableNode

	SetHash([]byte) error
	ResetHash()
	// contains filtered or unexported methods
}

type HashableNode

type HashableNode interface {
	avl.Node
	// contains filtered or unexported methods
}

type NodeHashFunc

type NodeHashFunc func(HashableNode) ([]byte, error)

type Proof

type Proof interface {
	encoding.BinaryMarshaler
}

type Prover

type Prover interface {
	Proof(node HashableNode, parents []HashableNode) (Proof, error)
	GenerateNodeHash(HashableNode) ([]byte, error)
	Prove(Proof, rootHash []byte) error
}

Jump to

Keyboard shortcuts

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