Skip to content

Commit

Permalink
fix: persisted keybook recheck keybook content for delete
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Aug 6, 2020
1 parent 5580435 commit 9b4b655
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/peer-store/persistent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class PersistentPeerStore extends PeerStore {

try {
// Deleted from the book
if (!peerId.pubKey) {
if (!this.keyBook.data.get(peerId.toB58String())) {
batch.delete(key)
return
}
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
const multiaddr = require('multiaddr')

module.exports.MULTIADDRS_WEBSOCKETS = [
multiaddr('/ip4/127.0.0.1/tcp/15001/ws/p2p/12D3KooWHFKTMzwerBtsVmtz4ZZEQy2heafxzWw6wNn5PPYkBxJ5')
multiaddr('/ip4/127.0.0.1/tcp/15001/ws/p2p/12D3KooWHFKTMzwerBtsVmtz4ZZEQy2heafxzWw6wNn5PPYkBxJ5')
]

0 comments on commit 9b4b655

Please sign in to comment.