forked from maidsafe/autonomi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not create wallet on registry refresh
Use the `try_load_from` mechanism, rather than `try_load`, because the former will not create the wallet directory if it does not exist. The node manager refreshes its registry when it runs commands like `start` and `stop`, which can be running as the root user. The refresh now involves getting the balance of the wallet. Therefore, when `start` ran for the first time, the `try_load` function was creating a directory owned by the root user. This would cause the node to crash because it couldn't write to that directory. A new Clippy warning is also fixed and I removed the superfluous comments around the code it was referring to.
- Loading branch information
Showing
3 changed files
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters