txs: Move commit tx generation out of the signature computation

We need the txs around, so don't throw them away after generating them.
This commit is contained in:
Christian Decker
2020-05-07 10:13:34 +09:30
committed by Rusty Russell
parent 667a763659
commit eb8eabcc3c
13 changed files with 108 additions and 45 deletions

View File

@@ -106,6 +106,7 @@ struct channel *new_initial_channel(const tal_t *ctx,
* @channel: The channel to evaluate
* @per_commitment_point: Per-commitment point to determine keys
* @side: which side to get the commitment transaction for
* @direct_outputs: If non-NULL, fill with pointers to the direct (non-HTLC) outputs (or NULL if none).
* @err_reason: When NULL is returned, this will point to a human readable reason.
*
* Returns the unsigned initial commitment transaction for @side, or NULL
@@ -116,6 +117,7 @@ struct bitcoin_tx *initial_channel_tx(const tal_t *ctx,
const struct channel *channel,
const struct pubkey *per_commitment_point,
enum side side,
struct wally_tx_output *direct_outputs[NUM_SIDES],
char** err_reason);
/**