Skip to content

Comments

Only log connection string if listening address present#129

Open
elnosh wants to merge 1 commit intolightningdevkit:mainfrom
elnosh:fix-unwrap-address
Open

Only log connection string if listening address present#129
elnosh wants to merge 1 commit intolightningdevkit:mainfrom
elnosh:fix-unwrap-address

Conversation

@elnosh
Copy link
Contributor

@elnosh elnosh commented Feb 22, 2026

I was hitting the unwrap if an address was not present in the config

@ldk-reviews-bot
Copy link

👋 Hi! Please choose at least one reviewer by assigning them on the right bar.
If no reviewers are assigned within 10 minutes, I'll automatically assign one.
Once the first reviewer has submitted a review, a second will be assigned if required.

);
match node.config().listening_addresses {
Some(addresses) => {
info!("CONNECTION_STRING: {}@{}", node.node_id(), addresses.first().unwrap());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this still be Some(vec![])? Would be safer to also not unwrap first()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried setting it empty/blank in the config i.e listening_addresses = [] and it would error out before this with invalid address. I can remove that unwrap as well though, I guess it wouldn't hurt.

@elnosh elnosh force-pushed the fix-unwrap-address branch from 051b915 to 20d9a38 Compare February 22, 2026 19:51
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.

3 participants