Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tapchannel: use new context for call to unlockLeases #1063

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

Roasbeef
Copy link
Member

@Roasbeef Roasbeef commented Aug 5, 2024

If the funding attempt takes a while and/or the users cancels the original request, if we're using the context passed along, then we may fail to actually unlock all the inputs:

2024-08-03 13:13:54.004 [ERR] TCHN: unable to unlock inputs: unable to unlock outpoint X:2: error listing existing leases: rpc error: code = Canceled desc = context canceled
2024-08-03 13:13:54.004 [DBG] TCHN: unlocking asset inputs: ([]wire.OutPoint) (len=1 cap=1) {
 (wire.OutPoint) X:1
}

2024-08-03 13:13:54.004 [ERR] TCHN: Unable to unlock asset inputs: unable to unlock asset outpoints [X:1]: unable to release coins: context canceled

This commit fixes that by using a fresh context.

If the funding attempt takes a while and/or the users cancels the
original request, if we're using the context passed along, then we may
fail to actually unlock all the inputs:
```
2024-08-03 13:13:54.004 [ERR] TCHN: unable to unlock inputs: unable to unlock outpoint X:2: error listing existing leases: rpc error: code = Canceled desc = context canceled
2024-08-03 13:13:54.004 [DBG] TCHN: unlocking asset inputs: ([]wire.OutPoint) (len=1 cap=1) {
 (wire.OutPoint) X:1
}

2024-08-03 13:13:54.004 [ERR] TCHN: Unable to unlock asset inputs: unable to unlock asset outpoints [X:1]: unable to release coins: context canceled
```

This commit fixes that by using a fresh context.
@Roasbeef Roasbeef requested review from a team, ffranr and jharveyb and removed request for a team August 5, 2024 23:39
@guggero guggero merged commit 8597ee3 into lightninglabs:main Aug 6, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants