Commit 5f1cc89a authored by laser's avatar laser
Browse files

feat(consume latest rust-fil-sector-builder SHA)

feat(stub piece expiry UTC seconds argument)

feat(add basic build)
parent 7f91d2dc
...@@ -258,11 +258,22 @@ func AddPiece( ...@@ -258,11 +258,22 @@ func AddPiece(
cPiecePath := C.CString(piecePath) cPiecePath := C.CString(piecePath)
defer C.free(unsafe.Pointer(cPiecePath)) defer C.free(unsafe.Pointer(cPiecePath))
// TODO: The UTC time, in seconds, at which the sector builder can safely
// delete the piece. This allows for co-location of pieces with similar time
// constraints, and allows the sector builder to remove sectors containing
// pieces whose deals have expired.
//
// This value is currently ignored by the sector builder.
//
// https://github.com/filecoin-project/rust-fil-sector-builder/issues/32
pieceExpiryUtcSeconds := 0
resPtr := C.sector_builder_ffi_add_piece( resPtr := C.sector_builder_ffi_add_piece(
(*C.sector_builder_ffi_SectorBuilder)(sectorBuilderPtr), (*C.sector_builder_ffi_SectorBuilder)(sectorBuilderPtr),
cPieceKey, cPieceKey,
C.uint64_t(pieceSize), C.uint64_t(pieceSize),
cPiecePath, cPiecePath,
C.uint64_t(pieceExpiryUtcSeconds),
) )
defer C.sector_builder_ffi_destroy_add_piece_response(resPtr) defer C.sector_builder_ffi_destroy_add_piece_response(resPtr)
......
Subproject commit 1f1b7244fd2bb82cf4fe12106a1fc012f9d42998 Subproject commit 7ea193ff1681a2e0eec22779700840d996ff0a07
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment