lightningdevkit / lightning-liquidity

Other
27 stars 17 forks source link

Check variable-amount payments against `{min,max}_payment_size_msat` #91

Closed tnull closed 8 months ago

tnull commented 8 months ago

Previously, we would open a channel of arbitrary size if the user didn't supply the optional payment_size_msat, i.e., would use no-MPP+var-invoice mode.

Here, we make sure to check the resulting expected_payment_size_msat would always adhere to our set limits and fail the HTLC otherwise.