core-lightning/escape_tx.h
Rusty Russell ebb068e975 Escape transaction support, test tools to create/check them.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-07-24 16:00:11 +09:30

29 lines
849 B
C

#ifndef LIGHTNING_ESCAPE_TX_H
#define LIGHTNING_ESCAPE_TX_H
#include <ccan/tal/tal.h>
#include "lightning.pb-c.h"
struct sha256_double;
struct sha256;
/* Create escape tx to spend our anchor tx output; doesn't fill in
* input scriptsig. */
struct bitcoin_tx *create_escape_tx(const tal_t *ctx,
OpenChannel *ours,
OpenChannel *theirs,
const struct sha256_double *anchor_txid,
unsigned int anchor_index,
uint64_t input_amount,
uint64_t escape_fee);
/* Create fast escape tx to spend our anchor tx output; doesn't fill in
* input scriptsig. */
struct bitcoin_tx *create_fast_escape_tx(const tal_t *ctx,
OpenChannel *ours,
OpenChannel *theirs,
const struct sha256_double *anchor_txid,
unsigned int anchor_index,
uint64_t input_amount,
uint64_t escape_fee);
#endif