From d9187f067776b763c97725ff2a6b078c130d634b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 26 Apr 2022 20:32:26 +0200 Subject: [PATCH] Storage: DatoCid call --- storage/storage.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/storage/storage.go b/storage/storage.go index fb56a64..2954c86 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -17,10 +17,14 @@ type SectorRef struct { ProofType abi.RegisteredSealProof } +var NoSectorRef = SectorRef{} + type Storage interface { // Creates a new empty sector (only allocate on disk. Layers above // storage are responsible for assigning sector IDs) NewSector(ctx context.Context, sector SectorRef) error + // Compute Data CID + DataCid(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData Data) (abi.PieceInfo, error) // Add a piece to an existing *unsealed* sector AddPiece(ctx context.Context, sector SectorRef, pieceSizes []abi.UnpaddedPieceSize, newPieceSize abi.UnpaddedPieceSize, pieceData Data) (abi.PieceInfo, error) }