Skip to content

Commit

Permalink
feat: ⬆️ Upgrade to cid-v1
Browse files Browse the repository at this point in the history
  • Loading branch information
whizzzkid authored and lidel committed Mar 27, 2024
1 parent b0dcad7 commit 5870a24
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/daemon/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const getGatewayPort = (config) => getHttpPort(config.Addresses.Gateway)
*/
function migrateConfig (ipfsd) {
// Bump revision number when new migration rule is added
const REVISION = 5
const REVISION = 6
const REVISION_KEY = 'daemonConfigRevision'
const CURRENT_REVISION = store.get(REVISION_KEY, 0)

Expand Down Expand Up @@ -231,6 +231,10 @@ function migrateConfig (ipfsd) {
}
}

if (CURRENT_REVISION < 6) {
ipfsd.api.files.chcid('/', { cidVersion: 1 })
}

if (changed) {
try {
writeConfigFile(ipfsd, config)
Expand Down

0 comments on commit 5870a24

Please sign in to comment.