core-lightning/lightningd/anchorspend.h
Rusty Russell 5332a8a67a lightningd: code to spend anchor outputs if we want to boost commitment tx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-29 11:28:47 -04:00

22 lines
694 B
C

#ifndef LIGHTNING_LIGHTNINGD_ANCHORSPEND_H
#define LIGHTNING_LIGHTNINGD_ANCHORSPEND_H
#include "config.h"
#include <ccan/tal/tal.h>
struct channel;
struct bitcoin_tx;
/* Find anchor, figure out details. Returns NULL if not an anchor channel,
* or we don't have any HTLCs and don't need to boost. */
struct anchor_details *create_anchor_details(const tal_t *ctx,
struct channel *channel,
const struct bitcoin_tx *tx);
/* Actual commit_tx refresh function: does CPFP using anchors if
* worthwhile. */
bool commit_tx_boost(struct channel *channel,
const struct bitcoin_tx **tx,
struct anchor_details *adet);
#endif /* LIGHTNING_LIGHTNINGD_ANCHORSPEND_H */