mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
closingd: start with proper maximum fee, not our guesstimate.
Fixes: #348 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
7ece90038b
commit
5281541ec6
1 changed files with 9 additions and 1 deletions
|
@ -1887,7 +1887,15 @@ static void peer_start_closingd(struct peer *peer,
|
|||
return;
|
||||
}
|
||||
|
||||
maxfee = commit_tx_base_fee(get_feerate(peer->ld->topology), 0);
|
||||
/* BOLT #2:
|
||||
*
|
||||
* A sending node MUST set `fee_satoshis` lower than or equal
|
||||
* to the base fee of the final commitment transaction as
|
||||
* calculated in [BOLT
|
||||
* #3](03-transactions.md#fee-calculation).
|
||||
*/
|
||||
maxfee = commit_tx_base_fee(peer->channel_info->feerate_per_kw, 0);
|
||||
|
||||
/* FIXME: Real fees! */
|
||||
minfee = maxfee / 2;
|
||||
startfee = (maxfee + minfee)/2;
|
||||
|
|
Loading…
Add table
Reference in a new issue