Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: default MFS to CIDv1 #2527

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from 2 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
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
Loading