(filename string, len int64)
| 53 | } |
| 54 | |
| 55 | func 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 | |
| 67 | func GenerateMetadata(idx, size uint64, hash []byte) common.Hash { |
| 68 | meta := make([]byte, 0) |
no outgoing calls
no test coverage detected