core-lightning/common/htlc_trim.h
Rusty Russell 85e3b43176 channeld, openingd: take into account option_anchor_outputs for fees.
HTLC fees increase (larger weight), and the fee paid by the opener
has to include the anchor outputs (i.e. 660 sats).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-14 11:51:14 +09:30

16 lines
470 B
C

#ifndef LIGHTNING_COMMON_HTLC_TRIM_H
#define LIGHTNING_COMMON_HTLC_TRIM_H
#include "config.h"
#include <common/amount.h>
#include <common/htlc.h>
/* If this htlc too small to create an output on @side's commitment tx? */
bool htlc_is_trimmed(enum side htlc_owner,
struct amount_msat htlc_amount,
u32 feerate_per_kw,
struct amount_sat dust_limit,
enum side side,
bool option_anchor_outputs);
#endif /* LIGHTNING_COMMON_HTLC_TRIM_H */