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

@@ -71,6 +71,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)
{
struct keyset keyset;
@@ -105,6 +106,7 @@ struct bitcoin_tx *initial_channel_tx(const tal_t *ctx,
channel->view[side].owed[!side],
channel->config[!side].channel_reserve,
0 ^ channel->commitment_number_obscurer,
direct_outputs,
side,
err_reason);
}