-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add mssing dag put
and dag resolve
cli commands
#2521
Conversation
Also allows passing input to `ipfs-exec` to simulate piping in cli tests.
src/cli/commands/dag/put.js
Outdated
preload | ||
}) | ||
|
||
if (pin) { |
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.
We should push the pinning functionality into core so that it can take a gc lock to avoid being collected between adding and pinning.
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.
Or back out of pinning in this PR...
src/core/components/dag.js
Outdated
await ipfs.pin.add(cid, { | ||
lock: true | ||
}) | ||
} |
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.
We need to take the lock around the ipld.put
and pin.add
like we do in ipfs.add
https://github.com/ipfs/js-ipfs/blob/master/src/core/components/files-regular/add-async-iterator.js#L58-L64
Note we'll need to call pin.add
with lock: false
in the same way we do with add.
Was added in ipfs/js-ipfs#2521 but not updated here.
Was added in ipfs/js-ipfs#2521 but not updated here.
Also allows passing input to
ipfs-exec
to simulate piping in cli tests.