From 09696269180cc97c00ca9071a74e85bc8acf59b5 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 18 Oct 2017 06:58:23 +1030 Subject: [PATCH] close_tx: make version 1, not version 2. Fixes: #311 Signed-off-by: Rusty Russell --- common/close_tx.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/close_tx.c b/common/close_tx.c index 017540b97..27e4f15f3 100644 --- a/common/close_tx.c +++ b/common/close_tx.c @@ -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;