Skip to content

staticaddr: wait for address manager initiation#953

Merged
hieblmi merged 1 commit into
lightninglabs:masterfrom
hieblmi:init-addr-mgr
Jun 16, 2025
Merged

staticaddr: wait for address manager initiation#953
hieblmi merged 1 commit into
lightninglabs:masterfrom
hieblmi:init-addr-mgr

Conversation

@hieblmi

@hieblmi hieblmi commented Jun 12, 2025

Copy link
Copy Markdown
Collaborator

This PR reverts a regression that was introduced in 042fe9f by making sure that the address manager is initialized before other managers begin their initialization.

It also applies the init pattern of reservations to staticaddr-managers.

Comment thread staticaddr/address/manager.go Outdated
}

// WaitInitComplete waits until the address manager has completed its setup.
func (m *Manager) WaitInitComplete() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd add waiting for a timeout here, either via passing in a context or just listening for a timer here and then returning an error.

We also have a different pattern already

if d.reservationManager != nil {
but that is more locs in the main function.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I went with your suggestion and applied your pattern to all static services. Will also run this over integration tests.

@sputn1ck sputn1ck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@hieblmi hieblmi self-assigned this Jun 16, 2025
@hieblmi
hieblmi merged commit 19ad091 into lightninglabs:master Jun 16, 2025
4 checks passed
@hieblmi
hieblmi deleted the init-addr-mgr branch June 16, 2025 09:52
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