fix: do not return self on peerstore.peers

This commit is contained in:
Vasco Santos
2020-07-15 14:34:51 +02:00
committed by Jacob Heun
parent dab1c8b2a5
commit 15613ccf19
6 changed files with 44 additions and 42 deletions

View File

@ -28,11 +28,12 @@ class PersistentPeerStore extends PeerStore {
/**
* @constructor
* @param {Object} properties
* @param {PeerId} properties.peerId
* @param {Datastore} properties.datastore Datastore to persist data.
* @param {number} [properties.threshold = 5] Number of dirty peers allowed before commit data.
*/
constructor ({ datastore, threshold = 5 }) {
super()
constructor ({ peerId, datastore, threshold = 5 }) {
super({ peerId })
/**
* Backend datastore used to persist data.