From 7419c7e6466ee1e46f8441690588d0b18af7a106 Mon Sep 17 00:00:00 2001 From: Rob Brackett Date: Tue, 13 Mar 2018 16:10:37 -0700 Subject: [PATCH 1/2] fix: Describe when and why to use `init: false` Add some description to the "advanced options" documentation for the `IPFS` constructor detailing that `init: false` should really be used if a repo has already been initialized *by IPFS* and that simply calling `repoInstance.init()` doesn't init a repo with everything IPFS needs. This partially handles #1245. License: MIT Signed-off-by: Rob Brackett --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e17645ee67..65e58b620b 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,11 @@ const repo = const node = new IPFS({ repo: repo, init: true, // default - // init: false, + // init: false, // If you have already initialized the repo via `new IPFS()`. + // // Be careful using this on an IPFSRepo instance you have + // // initialized yourself -- the IPFS constructor initializes + // // repos with extra options, so calling `init()` on an + // // IPFSRepo may not always be compatible with IPFS. // init: { // bits: 1024 // size of the RSA key generated // }, From 9e13f8dac4b0b14de47bb4b1c77b31fee869013d Mon Sep 17 00:00:00 2001 From: David Dias Date: Tue, 20 Mar 2018 20:34:56 -0700 Subject: [PATCH 2/2] docs: my take --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 65e58b620b..2c8bd7e0b0 100644 --- a/README.md +++ b/README.md @@ -194,11 +194,8 @@ const repo = const node = new IPFS({ repo: repo, init: true, // default - // init: false, // If you have already initialized the repo via `new IPFS()`. - // // Be careful using this on an IPFSRepo instance you have - // // initialized yourself -- the IPFS constructor initializes - // // repos with extra options, so calling `init()` on an - // // IPFSRepo may not always be compatible with IPFS. + // init: false, // You will need to set init: false after time you start instantiate a node as + // // the repo will be already initiated then. // init: { // bits: 1024 // size of the RSA key generated // },