mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
close_tx: make version 1, not version 2.
Fixes: #311 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
8f057f7fc7
commit
0969626918
1 changed files with 11 additions and 0 deletions
|
@ -18,8 +18,19 @@ struct bitcoin_tx *create_close_tx(const tal_t *ctx,
|
|||
|
||||
assert(to_us + to_them <= anchor_satoshis);
|
||||
|
||||
/* BOLT #3:
|
||||
*
|
||||
* ## Closing Transaction
|
||||
*
|
||||
* Note that there are two possible variants for each node.
|
||||
*
|
||||
* * version: 1
|
||||
* * locktime: 0
|
||||
* * txin count: 1
|
||||
*/
|
||||
/* Now create close tx: one input, two outputs. */
|
||||
tx = bitcoin_tx(ctx, 1, 2);
|
||||
tx->version = 1;
|
||||
|
||||
/* Our input spends the anchor tx output. */
|
||||
tx->input[0].txid = *anchor_txid;
|
||||
|
|
Loading…
Add table
Reference in a new issue