-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(WIP) Move parts of ipfs add
into lib core/coreunix
#1756
Conversation
License: MIT Signed-off-by: rht <rhtbot@gmail.com>
License: MIT Signed-off-by: rht <rhtbot@gmail.com>
@@ -90,49 +150,176 @@ func AddWrapped(n *core.IpfsNode, r io.Reader, filename string) (string, *merkle | |||
return gopath.Join(k.String(), filename), dagnode, nil | |||
} | |||
|
|||
func add(n *core.IpfsNode, reader io.Reader) (*merkledag.Node, error) { | |||
mp := n.Pinning.GetManual() | |||
func NewAdder(ctx context.Context, n *core.IpfsNode, out chan interface{}, progress bool, hidden bool, trickle bool, wrap bool, chunker string) Adder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe instead of such a big function, can have an init like:
a := NewAdder(ctx, n, out)
a.Progress = true // defaults to false
a.Hidden = false // defaults to true
a.Trickle = true // defaults to false
a.Chunker = "rabin" // defaults to ""
@rht this PR is great! much needed cleanup. |
😢 rebasing dev0.4.0 on this is gonna murder me. |
@whyrusleeping do you want this on top of dev0.4.0 instead? @rht would that be ok? /want to minimize work for whyrusleeping atm as he's handling a bunch of other important things |
Yeah, I would prefer that anything that touches add, the block store, or pinning go on top of 040. |
Will redo on top of 0.4.0. What is the remaining bottleneck to shipping 0.4.0? Dealing with merge conflicts? |
(merging is fine until this commit: 72c0282) |
@rht it needs to be rebased. but the real blockers are
|
No description provided.