Skip to content

Swap provider to support per-channel locking#86

Merged
Jossec101 merged 3 commits intomainfrom
fix-swasps-lock-to-per-channel-rule
Sep 18, 2025
Merged

Swap provider to support per-channel locking#86
Jossec101 merged 3 commits intomainfrom
fix-swasps-lock-to-per-channel-rule

Conversation

@Jossec101
Copy link
Contributor

  • Add ChannelId field to submarine swap requests
  • Replace global swap locks with per-channel lock maps
  • Update lock acquisition/release methods to accept channel ID
  • Fix pointer dereference for swap status in fee recording
  • Simplify reverse swap request to use single ChannelId instead of ChannelSet

- Add ChannelId field to submarine swap requests
- Replace global swap locks with per-channel lock maps
- Update lock acquisition/release methods to accept channel ID
- Fix pointer dereference for swap status in fee recording
- Simplify reverse swap request to use single ChannelId instead of ChannelSet
…annel

Implement cross-type swap locking to prevent simultaneous submarine and reverse swaps on the same channel. Add validation logic to check for existing locks of opposite swap types before acquiring new locks
@Jossec101 Jossec101 marked this pull request as ready for review September 18, 2025 14:19
RodriFS
RodriFS previously approved these changes Sep 18, 2025
- Change MonitorSwap mock returns from value to pointer types
- Remove unused MockNodeGuardServiceServer from generated mock file
- Update mock generation command to use interface-based approach
@Jossec101 Jossec101 enabled auto-merge (squash) September 18, 2025 14:53
@Jossec101 Jossec101 disabled auto-merge September 18, 2025 14:55
@Jossec101 Jossec101 merged commit 5b29e1b into main Sep 18, 2025
1 check passed
@Jossec101 Jossec101 deleted the fix-swasps-lock-to-per-channel-rule branch September 18, 2025 14:55
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.

2 participants