Skip to content

Commit ac7f3a4

Browse files
authored
Merge pull request #113 from alexpdev/docs
Docs
2 parents 4a92bc5 + 0345544 commit ac7f3a4

File tree

6 files changed

+301
-293
lines changed

6 files changed

+301
-293
lines changed

c/hasher.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -292,19 +292,19 @@ HASHV2 *HasherV2(char *path, unsigned piece_length)
292292
blocks_per_piece = (unsigned) floor(piece_length / BLOCKSIZE);
293293
while (true)
294294
{
295-
Layer *layerv2 = newLayer();
295+
Layer *layr2 = newLayer();
296296
uint8 *piece;
297297
for (int i = 0; i < blocks_per_piece; i++)
298298
{
299-
amount = fread(buffer, 1, BLOCKSIZE, fptr);
300-
total += amount;
301-
if (!amount) break;
302-
uint8 *hash = (uint8 *)malloc(amount);
303-
SHA256(hash, buffer, amount);
304-
addNode(layerv2, hash);
299+
amnt = fread(buffer, 1, BLOCKSIZE, fptr);
300+
total += amnt;
301+
if (!amnt) break;
302+
uint8 *hash = (uint8 *)malloc(amnt);
303+
SHA256(hash, buffer, amnt);
304+
addNode(layr2, hash);
305305
}
306-
if (!layerv2->count) break;
307-
if (layerv2->count < blocks_per_piece)
306+
if (!layr2->count) break;
307+
if (layr2->count < blocks_per_piece)
308308
{
309309
if (!layer_hashes->count)
310310
{
@@ -313,16 +313,16 @@ HASHV2 *HasherV2(char *path, unsigned piece_length)
313313
}
314314
else
315315
{
316-
remaining = blocks_per_piece - layerv2->count;
316+
remaining = blocks_per_piece - layr2->count;
317317
}
318318
uint8 *padding;
319319
for (int i = 0; i < remaining; i++)
320320
{
321321
padding = get_padding();
322-
addNode(layerv2, padding);
322+
addNode(layr2, padding);
323323
}
324324
}
325-
piece = merkle_root(layerv2);
325+
piece = merkle_root(layr2);
326326
addNode(layer_hashes, piece);
327327
}
328328
uint8 *piece_layerv2 = (uint8 *)malloc(HASHSIZE * layer_hashes->count);

docs/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/sitemap.xml.gz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)