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

@@ -1,8 +1,12 @@
#include "config.h"
#include <assert.h>
#include <bitcoin/feerate.h>
u32 feerate_from_style(u32 feerate, enum feerate_style style)
{
/* Make sure it's called somewhere! */
assert(feerate_floor_check() == FEERATE_FLOOR);
switch (style) {
case FEERATE_PER_KSIPA:
return feerate;