trie

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChildPosOutOfRange = errors.New("the position of the child is out of range")

ErrChildPosOutOfRange is raised when the position of a child in a branch node is less than 0 or greater than 16

View Source
var ErrEmptyNode = errors.New("the node is empty")

ErrEmptyNode is raised when we reach an empty node (a node with no children or no value)

View Source
var ErrInvalidEncoding = errors.New("cannot decode this invalid encoding")

ErrInvalidEncoding is raised when the encoded information cannot be decoded

View Source
var ErrInvalidNode = errors.New("invalid node")

ErrInvalidNode is raised when we reach an invalid node

View Source
var ErrNilDatabase = errors.New("no database provided")

ErrNilDatabase is raised when a database operation is called, but no database is provided

View Source
var ErrNilHasher = errors.New("no hasher provided")

ErrNilHasher is raised when the NewTrie() function is called, but a hasher isn't provided

View Source
var ErrNilMarshalizer = errors.New("no marshalizer provided")

ErrNilMarshalizer is raised when the NewTrie() function is called, but a marshalizer isn't provided

View Source
var ErrNilNode = errors.New("the node is nil")

ErrNilNode is raised when we reach a nil node

View Source
var ErrNodeNotFound = errors.New("the node is not present in the trie")

ErrNodeNotFound is raised when we try to get a node that is not present in the trie

View Source
var ErrValueTooShort = errors.New("cannot remove bytes from value because value is too short")

ErrValueTooShort is raised when we try to remove something from a value, and the value is too short

Functions

func NewTrie

func NewTrie(db data.DBWriteCacher, msh marshal.Marshalizer, hsh hashing.Hasher) (*patriciaMerkleTrie, error)

NewTrie creates a new Patricia Merkle Trie

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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