MCPcopy Create free account
hub / github.com/chain/txvm / treeToBytes

Function treeToBytes

protocol/state/serialize.go:51–58  ·  view source on GitHub ↗
(tree *patricia.Tree)

Source from the content-addressed store, hash-verified

49}
50
51func treeToBytes(tree *patricia.Tree) [][]byte {
52 var nodes [][]byte
53 patricia.Walk(tree, func(item []byte) error {
54 nodes = append(nodes, item)
55 return nil
56 })
57 return nodes
58}
59
60func treeFromBytes(keys [][]byte) (*patricia.Tree, error) {
61 tree := new(patricia.Tree)

Callers 1

BytesMethod · 0.85

Calls 1

WalkFunction · 0.92

Tested by

no test coverage detected