mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-08-01 14:33:19 +00:00
removes redundant echos
This commit is contained in:
parent
008b8950ef
commit
95daf3782e
@ -39,7 +39,6 @@ func `%`*(address: ethers.Address): JsonNode =
|
||||
|
||||
proc fromJson*(_: type MultiHash, json: JsonNode): ?!MultiHash =
|
||||
expectJsonKind(MultiHash, JString, json)
|
||||
echo "[MultiHash.fromJson] json.str: ", json.str
|
||||
without bytes =? json.str.hexToSeqByte.catch, err:
|
||||
return failure(err.msg)
|
||||
MultiHash.init(bytes).mapFailure
|
||||
|
||||
@ -24,16 +24,11 @@ proc createInfoDictionaryForContent(
|
||||
pieceHashCtx: sha1
|
||||
pieceIter = Iter[int].new(0 ..< numOfBlocksPerPiece)
|
||||
|
||||
echo "numOfBlocksPerPiece: ", numOfBlocksPerPiece
|
||||
echo "numOfPieces: ", numOfPieces
|
||||
pieceHashCtx.init()
|
||||
|
||||
let chunks = content.distribute(num = numOfPieces, spread = false)
|
||||
|
||||
echo "chunks: ", chunks.len
|
||||
|
||||
for chunk in chunks:
|
||||
echo "chunk: ", chunk.len
|
||||
if chunk.len == 0:
|
||||
break
|
||||
if pieceIter.finished:
|
||||
@ -114,7 +109,6 @@ twonodessuite "BitTorrent API":
|
||||
let response =
|
||||
client1.downloadManifestOnly(cid = torrentManifest.codexManifestCid).tryGet
|
||||
|
||||
echo "response: ", response
|
||||
let restContent = RestContent.fromJson(response).tryGet
|
||||
|
||||
check restContent.cid == torrentManifest.codexManifestCid
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user