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

cln: Sanity check max htlc amount msat #248

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

YusukeShimizu
Copy link
Contributor

@YusukeShimizu YusukeShimizu commented Sep 29, 2023

For #246 (comment)
Added logic to check the maximum htlc limit for cln set per node for each channel.
Additionally checking maxhtlc would be more strict than CLN's own limitations.

Also, to ensure that the receivable amout is also taken into account.

Added logic to check the maximum htlc limit
set per node for each channel.
Additionally checking maxhtlc would be
more strict than CLN's own limitations.

Also, to ensure that the receivable amout is also taken into account.
@YusukeShimizu YusukeShimizu marked this pull request as ready for review September 29, 2023 21:57
@grubles
Copy link
Collaborator

grubles commented Oct 2, 2023

Tested ACK 6ab037a.

Using setchannel htlcmax=1 on the CLN node.

CLN as swap receiver:

$ ./out/pscli swapin --sat_amt 18420558 --channel_id 179134633420587008 --asset lbtc
2023/10/02 15:00:24 rpc error: code = Unknown desc = exceeding receivable amount_msat: 1

CLN as swap sender:

$ lightning-cli --signet peerswap-swap-out 162922x1x0 18670459 lbtc  
{
   "code": -1,
   "message": "exceeding spendable amount_msat: 1"
}

@nepet
Copy link
Contributor

nepet commented Oct 6, 2023

Ack 6ab037a

@wtogami wtogami merged commit 99e1537 into ElementsProject:master Oct 6, 2023
11 of 12 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.

4 participants