mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 09:34:24 +01:00
lightningd: have sign_last_tx populate the input amounts.
With this change, all bitcoin_tx we send across the wire have their inputs_amounts populated. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -184,7 +184,13 @@ static void sign_last_tx(struct channel *channel)
|
||||
u8 *msg, **witness;
|
||||
|
||||
assert(!channel->last_tx->wtx->inputs[0].witness);
|
||||
|
||||
/* Attach input amount, to complete transaction for marshaling */
|
||||
if (!channel->last_tx->input_amounts[0]) {
|
||||
channel->last_tx->input_amounts[0]
|
||||
= tal_dup(channel->last_tx->input_amounts,
|
||||
struct amount_sat,
|
||||
&channel->funding);
|
||||
}
|
||||
msg = towire_hsm_sign_commitment_tx(tmpctx,
|
||||
&channel->peer->id,
|
||||
channel->dbid,
|
||||
|
||||
Reference in New Issue
Block a user