Skip to content

Conversation

@bhandras
Copy link
Member

This PR enables resumption of a stuck swap due to routing failures.

Pull Request Checklist

  • Update release_notes.md if your PR contains major features, breaking changes or bugfixes

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a recovery manager to handle unfinished swaps due to routing failures. It adds a NotificationManager interface and a resumeManager struct to manage and recover unfinished swaps. The changes include modifications to client.go, loopd/daemon.go, loopout.go, notifications/manager.go, and swapserverrpc/server.proto to incorporate the new recovery mechanism. The review focuses on identifying potential issues related to correctness, efficiency, and maintainability, with a severity level of medium or higher.

Comment on lines 666 to 673
message SubscribeNotificationsRequest {
enum ListenerVersion {
LEGACY = 0;
V1 = 1;
}

ListenerVersion version = 1;
}

Choose a reason for hiding this comment

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

medium

medium: Adding a ListenerVersion enum and version field to the SubscribeNotificationsRequest message. It's good practice to add a comment explaining the purpose of this versioning and when new versions might be introduced. This will help future developers understand the intent and maintain the code more effectively.

@bhandras bhandras changed the title loop: add recovery manager loop: add resume manager Oct 30, 2025
@lightninglabs lightninglabs deleted a comment from gemini-code-assist bot Oct 30, 2025
@lightninglabs lightninglabs deleted a comment from gemini-code-assist bot Oct 30, 2025
@lightninglabs lightninglabs deleted a comment from gemini-code-assist bot Oct 30, 2025
@lightninglabs lightninglabs deleted a comment from gemini-code-assist bot Oct 30, 2025
@bhandras bhandras merged commit 0a182ee into lightninglabs:master Oct 31, 2025
5 of 6 checks passed
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