assertPieceValid
assertPieceValid(
piece):void
Defined in: packages/synapse-core/src/utils/add-pieces-fits.ts:230
Throw if a piece can never be added: its PieceCID size is outside Curio’s upload bounds or its metadata exceeds the contract limits. Use it to reject bad pieces before any network work.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
piece |
LimiterPiece |
The piece to check. |
Returns
Section titled “Returns”void
Throws
Section titled “Throws”Errors assertPieceValid.ErrorType