@cryptotaxi247 / kubo / commits / 95f01537a

correct the blocksize calculation for link blocks

update hash for bigfile

Jeromy Johnson committed May 5, 2015 at 20:59 UTC 95f01537a330fc9c426f8281c63ed6299c6b28df
2 files changed +2 -2
importer/helpers/helpers.go
+1 -1
@@ -18,7 +18,7 @@ var BlockSizeLimit = 1048576 // 1 MB
18 // rough estimates on expected sizes
19 var roughDataBlockSize = chunk.DefaultBlockSize
20 var roughLinkBlockSize = 1 << 13 // 8KB
21 -var roughLinkSize = 258 + 8 + 5 // sha256 multihash + size + no name + protobuf framing
21 +var roughLinkSize = 34 + 8 + 5 // sha256 multihash + size + no name + protobuf framing
22
23 // DefaultLinksPerBlock governs how the importer decides how many links there
24 // will be per block. This calculation is based on expected distributions of:
test/sharness/t0040-add-and-cat.sh
+1 -1
@@ -138,7 +138,7 @@ test_expect_success EXPENSIVE "ipfs add bigfile succeeds" '
138 '
139
140 test_expect_success EXPENSIVE "ipfs add bigfile output looks good" '
141 - HASH="QmSVxWkYfbJ3cowQUUgF4iF4CQd92vubxw7bs2aZAVRUD9" &&
141 + HASH="QmU9SWAPPmNEKZB8umYMmjYvN7VyHqABNvdA6GUi4MMEz3" &&
142 echo "added $HASH mountdir/bigfile" >expected &&
143 test_cmp expected actual
144 '