Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
f63c6c00
Commit
f63c6c00
authored
8 years ago
by
Viktor Trón
Committed by
GitHub
8 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3133 from ethersphere/http-fix
swarm: fix http API's last problems
parents
30fb5c3e
eb2f01ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
chunker.go
swarm/storage/chunker.go
+8
-5
No files found.
swarm/storage/chunker.go
View file @
f63c6c00
...
...
@@ -178,10 +178,14 @@ func (self *TreeChunker) split(depth int, treeSize int64, key Key, data io.Reade
// leaf nodes -> content chunks
chunkData
:=
make
([]
byte
,
size
+
8
)
binary
.
LittleEndian
.
PutUint64
(
chunkData
[
0
:
8
],
uint64
(
size
))
_
,
err
:=
data
.
Read
(
chunkData
[
8
:
])
if
err
!=
nil
{
errC
<-
err
return
var
readBytes
int64
for
readBytes
<
size
{
n
,
err
:=
data
.
Read
(
chunkData
[
8
+
readBytes
:
])
readBytes
+=
int64
(
n
)
if
err
!=
nil
&&
!
(
err
==
io
.
EOF
&&
readBytes
==
size
)
{
errC
<-
err
return
}
}
select
{
case
jobC
<-
&
hashJob
{
key
,
chunkData
,
size
,
parentWg
}
:
...
...
@@ -371,7 +375,6 @@ func (self *LazyChunkReader) join(b []byte, off int64, eoff int64, depth int, tr
defer
parentWg
.
Done
()
// return NewDPA(&LocalStore{})
// chunk.Size = int64(binary.LittleEndian.Uint64(chunk.SData[0:8]))
// find appropriate block level
...
...
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