Skip to content

Conversation

@ziggie1984
Copy link
Contributor

@ziggie1984 ziggie1984 commented Feb 3, 2025

Fixes: lightningnetwork/lnd#9468

@aakselrod could you take a look, I am not sure why the rescan process is not running for the user but we need to make sure we update the scan variable so that new rescans can be started.

@ziggie1984 ziggie1984 marked this pull request as ready for review February 3, 2025 09:32
Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Thanks for investigating! Makes sense as a short-term fix. But looks like we really need to refactor the re-scan logic at some point.

@saubyk
Copy link
Collaborator

saubyk commented Feb 5, 2025

cc @yyforyongyu for review

case err := <-rescanErr:
if err != nil {
log.Errorf("Neutrino rescan ended with error: %s", err)
log.Errorf("Neutrino rescan ended with "+
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we know what the error is? What is the root cause?

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 am trying to obtain the logs from the user, but I think his node is generally working fine, my next step will be to let the user run the patch to see if that fixes the problem. But as Oliver and Laolu pointed out, this code part needs a refactor.

// object will fail.
log.Info("Neutrino rescan finished")
s.clientMtx.Lock()
s.scanning = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we don't know what caused the rescan error, this will just create a new scan and then getting the same error?

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 am not sure, basically the link failed because the NewAddress (NotifiedReceived) returned an error when registering the wtclient for a specific link:

https://github.com/lightningnetwork/lnd/blob/6bf895aeb929fb64265bfb226f796392921d8d3a/htlcswitch/link.go#L544-L550

user at least reported that now the link is active, so seems like the backend still works correctly maybe some error failed the rescan and now we need to just restart it, but yeah let's hope we get more information from the user.

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.

[bug]: Channel stuck in inactive state.

4 participants