Skip to content

Conversation

@demisrael
Copy link

@demisrael demisrael commented Jul 29, 2024

~/.khost/config.json entry:
default:
"archival": false,
enable archival argument:
"archival": true,
Set data-dir, for example:
"data_folder": "/srv/kaspad/",

Signed-off-by: Dmitry Perchanov <demisrael@gmail.com>
network: Network,
data_folder: Option<PathBuf>,
enable_upnp: bool,
archival: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field needs to be tagged with #[serde(default)], otherwise the previous version of the config file will fail to load (as the field is missing), resetting the entire config (as currently, it will fall back to a general error handling).

The default value for bool is false. You changed the new() ctor, which is what is used to create a new config, however, when config is deserialized, it uses serde.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, i see that without default, old configuration treated as invalid and khost starts as new deployment.

demisrael and others added 2 commits July 29, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants