Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NilValueNode = ValueNode(nil)
nilValueNode is used when collapsing internal trie nodes for hashing, since unset children need to serialize correctly.
Functions ¶
func HexToKey ¶
hexToKeybytes turns hex nibbles into key bytes. This can only be used for keys of even length.
func hexToKeybytes(hex []byte) []byte { if hasTerm(hex) { hex = hex[:len(hex)-1] } if len(hex)&1 != 0 { panic("can't convert hex key of odd length") } key := make([]byte, len(hex)/2) decodeNibbles(hex, key) return key }
Types ¶
type FullNode ¶
type Node ¶
type Node interface { String() string Travel(fn func(Node)) DeepTravel(func(Node, []byte), []byte) // contains filtered or unexported methods }
func DecodeNode ¶
Click to show internal directories.
Click to hide internal directories.