Create bitcoin_tx helper.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2015-05-29 11:33:18 +09:30
parent f43cdf085a
commit 3a62a9172d
3 changed files with 43 additions and 22 deletions

View File

@@ -1,6 +1,7 @@
#ifndef LIGHTNING_BITCOIN_TX_H
#define LIGHTNING_BITCOIN_TX_H
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include "shadouble.h"
#define BITCOIN_TX_VERSION 1
@@ -35,4 +36,9 @@ struct bitcoin_tx_input {
* signature. */
void sha256_tx(struct sha256_ctx *shactx, const struct bitcoin_tx *tx);
/* Allocate a tx: you just need to fill in inputs and outputs (they're
* zeroed with inputs' sequence_number set to FFFFFFFF) */
struct bitcoin_tx *bitcoin_tx(const tal_t *ctx, varint_t input_count,
varint_t output_count);
#endif /* LIGHTNING_BITCOIN_TX_H */