Skip to content

#79 Prevents lightchain node dir to be overwritten accidentally on init. #88

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

Merged
merged 2 commits into from
Feb 27, 2019

Conversation

EnchanterIO
Copy link
Contributor

  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests

@EnchanterIO EnchanterIO added the bug Something isn't working label Feb 27, 2019
@EnchanterIO EnchanterIO added this to the Stable Joe milestone Feb 27, 2019
@EnchanterIO EnchanterIO self-assigned this Feb 27, 2019
@EnchanterIO EnchanterIO requested a review from ggarri February 27, 2019 11:19
@@ -75,6 +76,13 @@ func newNodeCfgFromCmd(cmd *cobra.Command) (node.Config, setup.Network, error) {
shouldTrace, _ := cmd.Flags().GetBool(TraceFlag.Name)
traceLogFilePath, _ := cmd.Flags().GetString(TraceLogFlag.Name)

// This should be done inside of the `node.Init()` pkg but due to bad design,
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind to create an issue and include the number as part of this doc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done 802bf83

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done 802bf83

database/node.go Outdated
@@ -34,6 +34,7 @@ func NewNode(cfg *Config, consensusAPI conAPI.API, registry *prometheus.Registry
return nil, err
}

// Todo: Should be refactored, creating a new instance of a struct SHOULDN'T do any FS changes
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment could be part of the issue added to the backlog refering to the pending refactor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done 802bf83

@EnchanterIO EnchanterIO merged commit c195bde into master Feb 27, 2019
@EnchanterIO EnchanterIO deleted the 79_init_check_if_dir_exists branch February 27, 2019 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants