Skip to content

Add config file migration code #4784

@fasmat

Description

@fasmat

Description

The schema of the config file might change with new features or bug fixes. A current example would be: spacemeshos/post#212.

A node should be able to load a config file in an older format, migrate it to the current and persist it again. Preferably with some information about the version of the config file.

Acceptance criteria

  • When the node initially loads the config file from disk it determines the version information of the config file
    • Add a new schema (or similarly named) field to config. If not present assume version 0 (current version)
  • Load file and parse as the version presented
    • if not current version migrate the config and persist again

Implementation hints

Metadata

Metadata

Assignees

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions