1. 16 Jan, 2019 8 commits
    • Lucas Molas's avatar
      helpers: doc and TODOs · 2ea1b470
      Lucas Molas authored
      2ea1b470
    • Bamvor Zhang's avatar
      dag: Remove UnixfsNode · c8ae0ec6
      Bamvor Zhang authored
      Notes of removing UnixfsNode:
      - `NewLeafNode` will return the `FSNodeOverDag` with the given
        `fsNodeType`. While the old `NewLeaf`: `if data is nil the type
        field will be TRaw (for backwards compatibility), if data is
        defined (but possibly empty) the type field will be TRaw.`. Not
        sure if I should follow this. And because of this, I keep the
        `NewLeafNode` and `NewLeafDataNode`, not rename them to
        `NewLeaf` and `GetNextDataNode`.
      - There is no functions in importer/helpers/helpers.go. I am
        thinking if I should move the `FSNodeOverDag` part of
        importer/helpers/dagbuilder.go into importer/helpers/helpers.go.
      - `GetDagNode` return FilestoreNode for RawNode. But I do not
        understand how it is used in the `DagBuilderHelper.AddChild`. And
        `FileSize` do not calculate the size of RawNode because there is
        no flag of Raw in `FSNodeOverDag`.
      
      License: MIT
      Signed-off-by: default avatarBamvor Zhang <jian.zhang@ipfsbit.com>
      c8ae0ec6
    • Bamvor Zhang's avatar
      dag: remove the old FillNodeLayer · 183a92b6
      Bamvor Zhang authored
      License: MIT
      Signed-off-by: default avatarBamvor Zhang <jian.zhang@ipfsbit.com>
      183a92b6
    • Bamvor Zhang's avatar
      dag: remove `UnixfsNode` in Append of trickledag · a1e45547
      Bamvor Zhang authored
      License: MIT
      Signed-off-by: default avatarBamvor Zhang <jian.zhang@ipfsbit.com>
      a1e45547
    • Bamvor Zhang's avatar
      bb3e55c6
    • Bamvor Zhang's avatar
      dag: remove `UnixfsNode` in Layout of trickledag · 6aa0d7fd
      Bamvor Zhang authored
      This patch is the part of trickledag work which is similar to the
      merkledag work in commit 474b77a2bdb1c ("importer: remove `UnixfsNode`
      from the balanced builder"). Two helper functions(fillTrickleRecFSNode
      and FillFSNodeLayer) is introduced temporarily for modifing the Layout
      functions. These two funtions will be removed when all the code of
      UnixfsNode is removed in trickledag.go.
      
      Test ipfs add and get commands to check whether get the same hash of
      file after the code changes.
      
      License: MIT
      Signed-off-by: default avatarBamvor Zhang <jian.zhang@ipfsbit.com>
      6aa0d7fd
    • Bamvor Zhang's avatar
      Docs: update balanced builder document · b56bc955
      Bamvor Zhang authored
      After fsNodeType in NewLeafNode is supported by commit 85897b3f89301
      ("dag: add fsNodeType in NewLeafNode and NewLeafDataNode"). Move
      comments in NewLeafNode to importer/balanced/builder.go to clarify
      why TFile is used by balanced builder as leaves.
      
      License: MIT
      Signed-off-by: default avatarBamvor Zhang <jian.zhang@ipfsbit.com>
      b56bc955
    • Bamvor Zhang's avatar
      dag: add fsNodeType in NewLeafNode and NewLeafDataNode · c7228b92
      Bamvor Zhang authored
      NewLeafNode and NewLeafDataNode is introduced in commit 474b77a2bdb1c
      ("importer: remove `UnixfsNode` from the balanced builder"). It is
      intended to return ipfs.Node instead of UnixfsNode. But it only
      support creating the TFile leaf node for merkledag.
      
      This commit add fsNodeType to above two functions and update the code
      in dagbuild.go. Further patches of trickledag will make use of them
      and pass TRaw to create leaf node.
      
      License: MIT
      Signed-off-by: default avatarBamvor Zhang <jian.zhang@ipfsbit.com>
      c7228b92
  2. 04 Dec, 2018 1 commit
  3. 09 Nov, 2018 1 commit
  4. 26 Oct, 2018 1 commit
    • Hector Sanjuan's avatar
      Fix #27: Remove batching from importers · 60781411
      Hector Sanjuan authored
      A batching DAG service is forced onto the
      users of the importers, but they could just wrap
      the given DAGSerice in the batching one to get the same
      functionality (remembering to Close it at the end of the
      proccess).
      
      As detailed in #27, the importers should not be making choices
      about what DAGService is the right one to use and wrapping the
      given one.
      
      This change requires wrapping the DAGService in go-ipfs into
      ipld.Batch. and closing it when Finishing the adding process.
      60781411
  5. 16 Oct, 2018 1 commit
  6. 11 Aug, 2018 2 commits
  7. 30 Jul, 2018 2 commits