From 70a4bb9451c10a91dd42de5c366cb669d1e5c0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Habada?= Date: Wed, 22 Dec 2021 14:15:18 +0100 Subject: [PATCH] docs: peerstore configuration datastore fixed --- doc/CONFIGURATION.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/CONFIGURATION.md b/doc/CONFIGURATION.md index e6038c44..fdfccc80 100644 --- a/doc/CONFIGURATION.md +++ b/doc/CONFIGURATION.md @@ -675,15 +675,15 @@ const { NOISE } = require('libp2p-noise') const LevelDatastore = require('datastore-level') const datastore = new LevelDatastore('path/to/store') -const dsInstant = await datastore.open() +await datastore.open() // level database must be ready before node boot const node = await Libp2p.create({ + datastore, // pass the opened datastore modules: { transport: [TCP], streamMuxer: [MPLEX], connEncryption: [NOISE] }, - datastore: dsInstant, peerStore: { persistence: true, threshold: 5