Documentation ¶
Index ¶
Constants ¶
View Source
const (
// ChildrenCapacity is the maximum number of children in a branch node.
ChildrenCapacity = 16
)
Variables ¶
View Source
var ( // ErrDecodeStorageValue is defined since no sentinel error is defined // in the scale package. ErrDecodeStorageValue = errors.New("cannot decode storage value") ErrDecodeHashedStorageValue = errors.New("cannot decode hashed storage value") ErrDecodeHashedValueTooShort = errors.New("hashed storage value too short") ErrReadChildrenBitmap = errors.New("cannot read children bitmap") // ErrDecodeChildHash is defined since no sentinel error is defined // in the scale package. ErrDecodeChildHash = errors.New("cannot decode child hash") )
View Source
var (
ErrPartialKeyTooBig = errors.New("partial key length cannot be larger than 2^16")
)
View Source
var ErrReaderMismatchCount = errors.New("read unexpected number of bytes from reader")
View Source
var ErrVariantUnknown = errors.New("node variant is unknown")
Functions ¶
func DecodeNode ¶
TODO: move in another folder DecodeNode decodes a node from a reader. The encoding format is documented in the README.md of this package, and specified in the Polkadot spec at https://spec.polkadot.network/#sect-state-storage For branch decoding, see the comments on decodeBranch. For leaf decoding, see the comments on decodeLeaf.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.