Skip to content
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

Used hash is not added before being used #6

Closed
dignifiedquire opened this issue Dec 10, 2016 · 7 comments
Closed

Used hash is not added before being used #6

dignifiedquire opened this issue Dec 10, 2016 · 7 comments

Comments

@dignifiedquire
Copy link

The base hash used here: https://github.com/whyrusleeping/ipfs-whatever/blob/master/main.go#L64 seems to not be added before being used. Not sure where it comes from, would be great if it would be added in the setup process as js-ipfs does not have this object by default.

@dignifiedquire
Copy link
Author

@whyrusleeping ^^

@Kubuxu
Copy link
Contributor

Kubuxu commented Dec 10, 2016

It is empty directory hash, we ship it with default repo or it is part of some optimization path in go-ipfs.

@dignifiedquire
Copy link
Author

I see thanks

@dignifiedquire
Copy link
Author

I still think it would be good to not rely on its existence.

@Kubuxu
Copy link
Contributor

Kubuxu commented Dec 10, 2016

It is added as part of files api as it is default root directory and it is used by many more processes internally too.

I would just suggest js-ipfs add construct like that to its default repo, or add following object to the repo {"Links":[],"Data":"\u0008\u0001"} before running tests.

@whyrusleeping
Copy link
Owner

@dignifiedquire Yeah, js-ipfs should create and add this object during init. A large number of different processes assume this exists, and it saves a lot of time if we don't have to constantly check if not exists, create and add thing

@dignifiedquire
Copy link
Author

Okay thanks, will add this to js-ipfs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants