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

chore: encode buffers before printing #2164

Merged
merged 1 commit into from
Jun 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/core/ipns/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ class IpnsPublisher {
// Add record to routing (buffer key)
this._routing.put(key.toBuffer(), entryData, (err, res) => {
if (err) {
const errMsg = `ipns record for ${key.toString()} could not be stored in the routing`
const errMsg = `ipns record for ${key.toString('base64')} could not be stored in the routing`

log.error(errMsg)
return callback(errcode(new Error(errMsg), 'ERR_PUTTING_TO_ROUTING'))
}

log(`ipns record for ${key.toString()} was stored in the routing`)
log(`ipns record for ${key.toString('base64')} was stored in the routing`)
callback(null, res)
})
}
Expand All @@ -137,13 +137,13 @@ class IpnsPublisher {
// Add public key to routing (buffer key)
this._routing.put(key.toBuffer(), publicKey.bytes, (err, res) => {
if (err) {
const errMsg = `public key for ${key.toString()} could not be stored in the routing`
const errMsg = `public key for ${key.toString('base64')} could not be stored in the routing`

log.error(errMsg)
return callback(errcode(new Error(errMsg), 'ERR_PUTTING_TO_ROUTING'))
}

log(`public key for ${key.toString()} was stored in the routing`)
log(`public key for ${key.toString('base64')} was stored in the routing`)
callback(null, res)
})
}
Expand Down