MCPcopy Create free account
hub / github.com/ethstorage/es-node / createBlob

Function createBlob

ethstorage/storage_manager_test.go:120–127  ·  view source on GitHub ↗
(kvIndex uint64)

Source from the content-addressed store, hash-verified

118}
119
120func createBlob(kvIndex uint64) (blob []byte, hash common.Hash) {
121 val := make([]byte, 131072)
122 copy(val[:20], contractAddress.Bytes())
123 binary.BigEndian.PutUint64(val[20:28], kvIndex)
124 root := common.Hash{}
125 root, _ = prover.GetRoot(val, 1, 131072)
126 return val, root
127}
128
129func generateMetadata(idx, size uint64, hash []byte) common.Hash {
130 meta := make([]byte, 0)

Callers 3

setupFunction · 0.85

Calls 1

GetRootMethod · 0.65

Tested by

no test coverage detected