chore: apply suggestions from code review

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
This commit is contained in:
Vasco Santos
2020-05-07 15:49:03 +02:00
committed by Jacob Heun
parent 65e87460b0
commit 6627278a87
3 changed files with 5 additions and 3 deletions

View File

@ -112,7 +112,7 @@ class PersistentPeerStore extends PeerStore {
const batch = this._datastore.batch()
for (const peerIdStr of commitPeers) {
// PeerId
const peerId = this.keyBook.data.get(peerIdStr) || PeerId.createFromB58String(peerIdStr)
const peerId = this.keyBook.data.get(peerIdStr) || PeerId.createFromCID(peerIdStr)
// Address Book
this._batchAddressBook(peerId, batch)