assertAddPiecesFit
assertAddPiecesFit(
options):void
Defined in: packages/synapse-core/src/sp/add-pieces-fits.ts:92
Throw if pieces is empty, a PieceCID is outside Curio’s size bounds, or the
list does not fit in one addPieces / createAndAdd message.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options | LimiterOptions | LimiterOptions |
Returns
Section titled “Returns”void
Throws
Section titled “Throws”AtLeastOnePieceRequiredError when pieces is empty
Throws
Section titled “Throws”InvalidUploadSizeError when a PieceCID size is below SIZE_CONSTANTS.MIN_UPLOAD_SIZE or above SIZE_CONSTANTS.MAX_UPLOAD_SIZE
Throws
Section titled “Throws”AddPiecesBatchTooLargeError when the estimated message exceeds SIZE_CONSTANTS.MAX_ADD_PIECES_MESSAGE_SIZE