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

chore(channel offer): Reject a dlc channel offer if the processing fails #2157

Merged
merged 2 commits into from Mar 5, 2024

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented Mar 5, 2024

Unlike rejecting a dlc channel offer if accepting fails, the Channel::Offered and Contract::Offered have not been stored to the dlc store.

Hence, there is no rust-dlc state to be cleaned up. However, rust-dlc expects the Channel::Offered to be found by it's dlc_channel_id, which if it can't will fail the function.

This patch implements the reject only on the application layer, but we might want to consider moving that code to rust-dlc

Prevents users from running into bugs like this #2131 to end up in a stuck state.

…ils.

Unlike rejecting a dlc channel offer if accepting fails, the `Channel::Offered` and `Contract::Offered` have not been stored to the dlc store.

Hence, there is no rust-dlc state to be cleaned up. Howerver, `rust-dlc` expects the `Channel::Offered` to be found by it's `dlc_channel_id`, which if it can't will fail the function.

This patch implements the reject soly on the application layer, but we might want to consider moving that code to rust-dlc`
@holzeis holzeis self-assigned this Mar 5, 2024
The same logic applies for a failed `SettleOffer` and `RenewOffer`
@holzeis holzeis linked an issue Mar 5, 2024 that may be closed by this pull request
@holzeis holzeis added this pull request to the merge queue Mar 5, 2024
Merged via the queue into main with commit a29c8e5 Mar 5, 2024
20 checks passed
@holzeis holzeis deleted the chore/reject-channel-offer-if-failed-on-processing branch March 5, 2024 11:01
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.

Reject channel offer if processing it failed
2 participants