mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
closingd: make sure we restrict feerange with initial offer.
@ZmnSCPxj points out that this is allowed, though invalid: 1. commitment_fee = 1000 2. funder: 800 3. fundee: 200 4. funder: 900 We need to adjust the feerange using the initial funder offer.
This commit is contained in:
parent
7ca4422d7d
commit
1faec99c59
@ -530,6 +530,10 @@ int main(int argc, char *argv[])
|
|||||||
/* Now we have first two points, we can init fee range. */
|
/* Now we have first two points, we can init fee range. */
|
||||||
init_feerange(&feerange, commitment_fee, offer, deprecated_api);
|
init_feerange(&feerange, commitment_fee, offer, deprecated_api);
|
||||||
|
|
||||||
|
/* Apply (and check) funder offer now. */
|
||||||
|
adjust_feerange(&cs, gossip_index, &channel_id,
|
||||||
|
&feerange, offer[funder], funder);
|
||||||
|
|
||||||
/* Now any extra rounds required. */
|
/* Now any extra rounds required. */
|
||||||
while (offer[LOCAL] != offer[REMOTE]) {
|
while (offer[LOCAL] != offer[REMOTE]) {
|
||||||
/* Still don't agree: adjust feerange based on previous offer */
|
/* Still don't agree: adjust feerange based on previous offer */
|
||||||
|
Loading…
Reference in New Issue
Block a user