Versions in this module Expand all Collapse all v0 v0.9.0 Mar 1, 2024 Changes in this version + const ChildrenCapacity + var DeepCopySettings = CopySettings + var DefaultCopySettings = CopySettings + var ErrDecodeChildHash = errors.New("cannot decode child hash") + var ErrDecodeHashedStorageValue = errors.New("cannot decode hashed storage value") + var ErrDecodeHashedValueTooShort = errors.New("hashed storage value too short") + var ErrDecodeStorageValue = errors.New("cannot decode storage value") + var ErrPartialKeyTooBig = errors.New("partial key length cannot be larger than 2^16") + var ErrReadChildrenBitmap = errors.New("cannot read children bitmap") + var ErrReaderMismatchCount = errors.New("read unexpected number of bytes from reader") + var ErrVariantUnknown = errors.New("node variant is unknown") + func MerkleValue(encoding []byte, writer io.Writer) (err error) + func MerkleValueRoot(rootEncoding []byte, writer io.Writer) (err error) + type Buffer interface + Bytes func() []byte + Len func() int + type CopySettings struct + CopyChildren bool + CopyMerkleValue bool + CopyPartialKey bool + CopyStorageValue bool + type Kind byte + const Branch + const Leaf + func (k Kind) String() string + type Node struct + Children []*Node + Descendants uint32 + Dirty bool + Generation uint64 + IsHashedValue bool + MerkleValue []byte + MustBeHashed bool + PartialKey []byte + StorageValue []byte + func Decode(reader io.Reader) (n *Node, err error) + func (n *Node) CalculateMerkleValue() (merkleValue []byte, err error) + func (n *Node) CalculateRootMerkleValue() (merkleValue []byte, err error) + func (n *Node) ChildrenBitmap() (bitmap uint16) + func (n *Node) Copy(settings CopySettings) *Node + func (n *Node) Encode(buffer Buffer) (err error) + func (n *Node) EncodeAndHash() (encoding, merkleValue []byte, err error) + func (n *Node) EncodeAndHashRoot() (encoding, merkleValue []byte, err error) + func (n *Node) HasChild() (has bool) + func (n *Node) Kind() Kind + func (n *Node) NumChildren() (count int) + func (n *Node) SetClean() + func (n *Node) SetDirty() + func (n *Node) StorageValueEqual(stoageValue []byte) (equal bool) + func (n *Node) String() string + func (n *Node) StringNode() (stringNode *gotree.Node)