Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
95f01537
Commit
95f01537
authored
9 years ago
by
Jeromy Johnson
Committed by
Jeromy
9 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct the blocksize calculation for link blocks
update hash for bigfile
parent
54633317
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
importer/helpers/helpers.go
importer/helpers/helpers.go
+1
-1
test/sharness/t0040-add-and-cat.sh
test/sharness/t0040-add-and-cat.sh
+1
-1
No files found.
importer/helpers/helpers.go
View file @
95f01537
...
...
@@ -18,7 +18,7 @@ var BlockSizeLimit = 1048576 // 1 MB
// rough estimates on expected sizes
var
roughDataBlockSize
=
chunk
.
DefaultBlockSize
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
// will be per block. This calculation is based on expected distributions of:
...
...
This diff is collapsed.
Click to expand it.
test/sharness/t0040-add-and-cat.sh
View file @
95f01537
...
...
@@ -138,7 +138,7 @@ test_expect_success EXPENSIVE "ipfs add bigfile succeeds" '
'
test_expect_success EXPENSIVE
"ipfs add bigfile output looks good"
'
HASH="Qm
SVxWkYfbJ3cowQUUgF4iF4CQd92vubxw7bs2aZAVRUD9
" &&
HASH="Qm
U9SWAPPmNEKZB8umYMmjYvN7VyHqABNvdA6GUi4MMEz3
" &&
echo "added $HASH mountdir/bigfile" >expected &&
test_cmp expected actual
'
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment