mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-23 21:47:52 +08:00
correct the blocksize calculation for link blocks
update hash for bigfile
This commit is contained in:
@ -18,7 +18,7 @@ var BlockSizeLimit = 1048576 // 1 MB
|
|||||||
// rough estimates on expected sizes
|
// rough estimates on expected sizes
|
||||||
var roughDataBlockSize = chunk.DefaultBlockSize
|
var roughDataBlockSize = chunk.DefaultBlockSize
|
||||||
var roughLinkBlockSize = 1 << 13 // 8KB
|
var roughLinkBlockSize = 1 << 13 // 8KB
|
||||||
var roughLinkSize = 258 + 8 + 5 // sha256 multihash + size + no name + protobuf framing
|
var roughLinkSize = 34 + 8 + 5 // sha256 multihash + size + no name + protobuf framing
|
||||||
|
|
||||||
// DefaultLinksPerBlock governs how the importer decides how many links there
|
// DefaultLinksPerBlock governs how the importer decides how many links there
|
||||||
// will be per block. This calculation is based on expected distributions of:
|
// will be per block. This calculation is based on expected distributions of:
|
||||||
|
@ -138,7 +138,7 @@ test_expect_success EXPENSIVE "ipfs add bigfile succeeds" '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success EXPENSIVE "ipfs add bigfile output looks good" '
|
test_expect_success EXPENSIVE "ipfs add bigfile output looks good" '
|
||||||
HASH="QmSVxWkYfbJ3cowQUUgF4iF4CQd92vubxw7bs2aZAVRUD9" &&
|
HASH="QmU9SWAPPmNEKZB8umYMmjYvN7VyHqABNvdA6GUi4MMEz3" &&
|
||||||
echo "added $HASH mountdir/bigfile" >expected &&
|
echo "added $HASH mountdir/bigfile" >expected &&
|
||||||
test_cmp expected actual
|
test_cmp expected actual
|
||||||
'
|
'
|
||||||
|
Reference in New Issue
Block a user