lightningd: clarify uses of dynamic (mempool) feerate floor, and static.

We have the FEERATE_FLOOR constant if you don't care, but usually you want
to use the current bitcoind lower limit, so call get_feerate_floor()
(which is currently the same, but coming!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-04-07 14:09:53 +09:30
parent 7aa8c76002
commit faae44713b
8 changed files with 29 additions and 12 deletions

View File

@@ -409,8 +409,8 @@ void peer_start_closingd(struct channel *channel, struct peer_fd *peer_fd)
feerate = mutual_close_feerate(ld->topology);
if (!feerate) {
feerate = final_commit_feerate / 2;
if (feerate < feerate_floor())
feerate = feerate_floor();
if (feerate < get_feerate_floor(ld->topology))
feerate = get_feerate_floor(ld->topology);
}
/* We use a feerate if anchor_outputs, otherwise max fee is set by