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

Commit d9187f0

Browse files
magik6karajasek
authored andcommitted
Storage: DatoCid call
1 parent 5ff6068 commit d9187f0

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
@@ -17,10 +17,14 @@ type SectorRef struct {
1717
ProofType abi.RegisteredSealProof
1818
}
1919

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

0 commit comments

Comments
 (0)