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-merkledag
Commits
6d19c80d
Commit
6d19c80d
authored
Sep 15, 2014
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move first data block into top level dag node
parent
a7f7f359
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
dagreader.go
dagreader.go
+1
-0
merkledag.go
merkledag.go
+2
-1
No files found.
dagreader.go
View file @
6d19c80d
...
...
@@ -34,6 +34,7 @@ func NewDagReader(n *Node, serv *DAGService) (io.Reader, error) {
node
:
n
,
thisData
:
pb
.
GetData
(),
serv
:
serv
,
buf
:
bytes
.
NewBuffer
(
pb
.
GetData
()),
},
nil
case
PBData_Raw
:
return
bytes
.
NewBuffer
(
pb
.
GetData
()),
nil
...
...
merkledag.go
View file @
6d19c80d
...
...
@@ -157,10 +157,11 @@ func (n *DAGService) Get(k u.Key) (*Node, error) {
return
Decoded
(
b
.
Data
)
}
func
FilePBData
()
[]
byte
{
func
FilePBData
(
data
[]
byte
)
[]
byte
{
pbfile
:=
new
(
PBData
)
typ
:=
PBData_File
pbfile
.
Type
=
&
typ
pbfile
.
Data
=
data
data
,
err
:=
proto
.
Marshal
(
pbfile
)
if
err
!=
nil
{
...
...
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