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

Function CreateMetaFile

ethstorage/p2p/protocol/sync_test.go:55–65  ·  view source on GitHub ↗
(filename string, len int64)

Source from the content-addressed store, hash-verified

53}
54
55func CreateMetaFile(filename string, len int64) (*os.File, error) {
56 file, err := os.Create(filename)
57 if err != nil {
58 return nil, err
59 }
60 err = fallocate.Fallocate(file, int64((32)*len), int64(32))
61 if err != nil {
62 return nil, err
63 }
64 return file, nil
65}
66
67func GenerateMetadata(idx, size uint64, hash []byte) common.Hash {
68 meta := make([]byte, 0)

Callers 7

TestSync_RequestL2RangeFunction · 0.85
TestSync_RequestL2ListFunction · 0.85
testSyncFunction · 0.85
TestAddPeerDuringSyncingFunction · 0.85
TestAddPeerAfterSyncDoneFunction · 0.85
TestFillEmptyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected