Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Commit 874a255

Browse files
authored
Storage: DatoCid call (#26)
1 parent 9bcd947 commit 874a255

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

storage/storage.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ type SectorRef struct {
1616
ProofType abi.RegisteredSealProof
1717
}
1818

19+
var NoSectorRef = SectorRef{}
20+
1921
type Storage interface {
2022
// Creates a new empty sector (only allocate on disk. Layers above
2123
// storage are responsible for assigning sector IDs)
2224
NewSector(ctx context.Context, sector SectorRef) error
25+
// Compute Data CID
26+
DataCid(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData Data) (abi.PieceInfo, error)
2327
// Add a piece to an existing *unsealed* sector
2428
AddPiece(ctx context.Context, sector SectorRef, pieceSizes []abi.UnpaddedPieceSize, newPieceSize abi.UnpaddedPieceSize, pieceData Data) (abi.PieceInfo, error)
2529
}

0 commit comments

Comments
 (0)