storage.go 615 Bytes
Newer Older
1 2 3
package storage

import (
董子豪's avatar
董子豪 committed
4
	"io"
董子豪's avatar
董子豪 committed
5

6
	"fil_integrate/build/state-types/abi"
董子豪's avatar
董子豪 committed
7
	"fil_integrate/build/cid"
8
)
董子豪's avatar
董子豪 committed
9
const SectorSize32MiB uint64 = 32*1024*1024
10 11 12

type Data = io.Reader

董子豪's avatar
董子豪 committed
13
type PieceRef cid.Commit
董子豪's avatar
董子豪 committed
14

15 16 17 18 19
type SectorRef struct {
	ID        abi.SectorID
	ProofType abi.RegisteredSealProof
}

董子豪's avatar
董子豪 committed
20 21
type RangeSector struct {
	Sector   SectorRef
董子豪's avatar
董子豪 committed
22 23
	Unsealed cid.Commit
	Offset   abi.UnpaddedByteIndex
董子豪's avatar
董子豪 committed
24 25 26
	Size     abi.UnpaddedPieceSize
}

27 28 29 30 31
type PreCommit1Out []byte

type Commit1Out []byte

type SectorCids struct {
董子豪's avatar
董子豪 committed
32 33
	Unsealed cid.Commit
	Sealed   cid.Commit
董子豪's avatar
董子豪 committed
34 35 36
}

type Piece struct {
董子豪's avatar
董子豪 committed
37
	Commitment cid.Commit
董子豪's avatar
董子豪 committed
38
	Size       abi.UnpaddedPieceSize
董子豪's avatar
董子豪 committed
39
}