Block created on ipfs init cannot be accessed by my datstore

Hi, I implemented my own datastore and I’m updating the config and datastore_spec file to make go-ipfs use my datastore. Here are the steps I took.

  1. use command ipfs init (config files are generated)
  2. update config file to use my datastore
  3. update datastore_spec to use my datastore
  4. start using ipfs

What I’ve noticed is that during step 1, some blocks are created and because the default config is to use flatfs, it generates those blocks in flatfs. However, because I change my datastore in step 2 and 3, later on when it tries to find those blocks, it can’t.

Is there a way for me to ipfs init with the config I want instead of letting it generate one and put blocks in the datastore I later on what to change out of?

ipfs init your-config.json as documented in ipfs init --help.

1 Like

Ah got it, thank you!