Documentation ¶
Index ¶
Constants ¶
View Source
const RADIX = 256
RADIX specifies the number of unique digits in patricia
Variables ¶
View Source
var ( // ErrInvalidPatricia indicates invalid operation ErrInvalidPatricia = errors.New("invalid patricia operation") // ErrPathDiverge indicates the path diverges ErrPathDiverge = errors.New("path diverges") )
View Source
var ( // ErrInvalidTrie indicates something wrong causing invalid operation ErrInvalidTrie = errors.New("invalid trie operation") // ErrNotExist indicates entry does not exist ErrNotExist = errors.New("not exist in trie") )
Functions ¶
This section is empty.
Types ¶
type Trie ¶
type Trie interface { Upsert([]byte, []byte) error // insert a new entry Get([]byte) ([]byte, error) // retrieve an existing entry Delete([]byte) error // delete an entry Commit([][]byte, [][]byte) error // commit the state changes in a batch Close() error // close the trie DB RootHash() common.Hash32B // returns trie's root hash }
Trie is the interface of Merkle Patricia Trie
Click to show internal directories.
Click to hide internal directories.