Update sync.js

Remove console.error, since the error is already caught and reported by events.emit('error') afterwards
This commit is contained in:
Julien Malard-Adam 2025-02-12 11:15:08 +01:00 committed by GitHub
parent 28b3e807de
commit d504e0f7ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -194,7 +194,6 @@ const Sync = async ({ ipfs, log, events, onSynced, start, timeout }) => {
const stream = await libp2p.dialProtocol(remotePeer, headsSyncAddress, { signal })
await pipe(sendHeads, stream, receiveHeads(peerId))
} catch (e) {
console.error(e)
peers.delete(peerId)
if (e.name === 'UnsupportedProtocolError') {
// Skip peer, they don't have this database currently