-
Notifications
You must be signed in to change notification settings - Fork 121
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
Custom channel bug fixes #936
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffranr
approved these changes
Jun 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit fixes an issue with co-op closing channels where one side has no balance.
This commit returns an empty string if there is no custom data in a channel. That prevents the lncli output from showing: "custom_channel_data": "{\"assets\":null}", And instead just shows: "custom_channel_data: "", At the same time, we add the previously forgotten pending channels to the calls of RPC methods that we want to format the response for.
To make sure the lnd forwarding algorithm doesn't reject an incoming HTLC because due to the asset resolution it appears they aren't paying enough fees, we always add a single asset unit. This doesn't actually mean we're sending an additional unit every time, it just means we might accept an HTLC even if it pays a couple of milli-satoshis too little fees. This can be remediated by increasing the asset resolution/precision.
If a payment is coming in through one asset channel and is supposed to leave through another asset channel, we don't actually have to do any conversion to BTC but instead to the outgoing asset directly (this would be a single hop payment with asset channels on both sides). To allow that forwarding mode, we add a new policy that contains both an incoming and outgoing channel policy.
ffranr
approved these changes
Jun 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the following issues:
PendingChannels
RPC