Do not error on startup for optional values#124
Merged
benthecarman merged 1 commit intolightningdevkit:mainfrom Feb 15, 2026
Merged
Do not error on startup for optional values#124benthecarman merged 1 commit intolightningdevkit:mainfrom
benthecarman merged 1 commit intolightningdevkit:mainfrom
Conversation
|
🎉 This PR is now ready for review! |
Collaborator
|
can you add tests for this? |
f9537a7 to
a241321
Compare
8af3e9b to
874e098
Compare
ldk-server/src/util/config.rs
Outdated
| Some(storage_path.join(config_file_name).to_string_lossy().to_string()); | ||
|
|
||
| // Test with optional values not specified in the config file | ||
| #[cfg(not(any()))] |
Contributor
Author
There was a problem hiding this comment.
woops, residue from my debugging this test. Removed.
Do not error on startup if storage path, listening addresses or announcement addresses fields were not specified in the config as these are optional values.
874e098 to
dbef444
Compare
benthecarman
approved these changes
Feb 15, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the config file didn't have
listening_addresses,announcement_addressesordir_pathit would err and fail to start up.dir_pathit would fail before it could fallback to the~/.ldk-server/default.listening_addressesandannouncement_addressesI think those should be options as well (?) so removed those errors