import index strat...

This commit is contained in:
Dmitriy Ryajov 2023-12-22 17:13:53 -06:00
parent d7653ea6ba
commit e68073966f
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
1 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,7 @@ import ../stores
import ../blocktype as bt
import ../utils
import ../utils/asynciter
import ../indexingstrategy
import pkg/stew/byteutils
@ -223,7 +224,10 @@ proc prepareDecodingData(
return success (dataPieces, parityPieces)
proc init(_: type EncodingParams, manifest: Manifest, ecK: int, ecM: int): ?!EncodingParams =
proc init*(
_: type EncodingParams,
manifest: Manifest,
ecK: int, ecM: int): ?!EncodingParams =
if ecK > manifest.blocksCount:
return failure("Unable to encode manifest, not enough blocks, ecK = " & $ecK & ", blocksCount = " & $manifest.blocksCount)