Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit b404974

Browse files
authored
feat: persist peerstore (#3072)
Stores peer addresses in the repo datastore under the keys `/peers/*`
1 parent 832271e commit b404974

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/ipfs/src/core/runtime/libp2p-browser.js

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ module.exports = () => {
6363
},
6464
metrics: {
6565
enabled: true
66+
},
67+
peerStore: {
68+
persistence: true,
69+
threshold: 1
6670
}
6771
}
6872
}

packages/ipfs/src/core/runtime/libp2p-nodejs.js

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ module.exports = () => {
6666
},
6767
metrics: {
6868
enabled: true
69+
},
70+
peerStore: {
71+
persistence: true
6972
}
7073
}
7174
}

0 commit comments

Comments
 (0)