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

Commit

Permalink
feat: persist peerstore (#3072)
Browse files Browse the repository at this point in the history
Stores peer addresses in the repo datastore under the keys `/peers/*`
  • Loading branch information
vasco-santos authored Jun 10, 2020
1 parent 832271e commit b404974
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/ipfs/src/core/runtime/libp2p-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ module.exports = () => {
},
metrics: {
enabled: true
},
peerStore: {
persistence: true,
threshold: 1
}
}
}
3 changes: 3 additions & 0 deletions packages/ipfs/src/core/runtime/libp2p-nodejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ module.exports = () => {
},
metrics: {
enabled: true
},
peerStore: {
persistence: true
}
}
}

0 comments on commit b404974

Please sign in to comment.