Commit 6d19c80d authored by Jeromy's avatar Jeromy

move first data block into top level dag node

parent a7f7f359
......@@ -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
......
......@@ -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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment