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

kaspad: append archival argument, disabled by default. #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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/",

@@ -12,6 +12,7 @@ pub struct Config {
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.

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