From b17db120b14689a72b45bf896a9c7b48d8b0168a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 17 Jun 2022 14:42:35 +0930 Subject: [PATCH] bitcoin: add to check-source-bolt, and (minor) quotes fixup. Signed-off-by: Rusty Russell --- bitcoin/Makefile | 3 +++ bitcoin/psbt.c | 4 ++-- bitcoin/script.c | 14 +++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/bitcoin/Makefile b/bitcoin/Makefile index 49e2fc806..df2dc04b0 100644 --- a/bitcoin/Makefile +++ b/bitcoin/Makefile @@ -41,6 +41,9 @@ BITCOIN_HEADERS := bitcoin/address.h \ # Bitcoin objects depends on bitcoin/ external/ and ccan $(BITCOIN_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(EXTERNAL_HEADERS) +ALL_C_HEADERS += $(BITCOIN_HEADERS) +ALL_C_SOURCES += $(BITCOIN_SRC) + check-makefile: check-bitcoin-makefile check-bitcoin-makefile: diff --git a/bitcoin/psbt.c b/bitcoin/psbt.c index a079fe49b..6f346b9db 100644 --- a/bitcoin/psbt.c +++ b/bitcoin/psbt.c @@ -618,11 +618,11 @@ bool psbt_finalize(struct wally_psbt *psbt) /* BOLT #3: * #### `to_remote` Output * - * If `option_anchor_outputs` applies to the commitment + * If `option_anchors` applies to the commitment * transaction, the `to_remote` output is encumbered by a one * block csv lock. * - * OP_CHECKSIGVERIFY 1 OP_CHECKSEQUENCEVERIFY + * OP_CHECKSIGVERIFY 1 OP_CHECKSEQUENCEVERIFY * * The output is spent by an input with `nSequence` * field set to `1` and witness: diff --git a/bitcoin/script.c b/bitcoin/script.c index 316388696..68a26dd5b 100644 --- a/bitcoin/script.c +++ b/bitcoin/script.c @@ -314,10 +314,10 @@ u8 *scriptpubkey_witness_raw(const tal_t *ctx, u8 version, * * #### `to_remote` Output * - * If `option_anchor_outputs` applies to the commitment + * If `option_anchors` applies to the commitment * transaction, the `to_remote` output is encumbered by a one * block csv lock. - * OP_CHECKSIGVERIFY 1 OP_CHECKSEQUENCEVERIFY + * OP_CHECKSIGVERIFY 1 OP_CHECKSEQUENCEVERIFY */ /* BOLT- #3 * ##### Leased channel (`option_will_fund`) @@ -564,7 +564,7 @@ u8 *bitcoin_wscript_to_local(const tal_t *ctx, u16 to_self_delay, * This output sends funds to either an HTLC-timeout transaction after the * HTLC-timeout or to the remote node using the payment preimage or the * revocation key. The output is a P2WSH, with a witness script (no - * option_anchor_outputs): + * option_anchors): * * # To remote node with revocation key * OP_DUP OP_HASH160 OP_EQUAL @@ -582,7 +582,7 @@ u8 *bitcoin_wscript_to_local(const tal_t *ctx, u16 to_self_delay, * OP_ENDIF * OP_ENDIF * - * Or, with `option_anchor_outputs`: + * Or, with `option_anchors`: * * # To remote node with revocation key * OP_DUP OP_HASH160 OP_EQUAL @@ -671,7 +671,7 @@ u8 *bitcoin_wscript_htlc_offer(const tal_t *ctx, * This output sends funds to either the remote node after the HTLC-timeout or * using the revocation key, or to an HTLC-success transaction with a * successful payment preimage. The output is a P2WSH, with a witness script - * (no `option_anchor_outputs`): + * (no `option_anchors`): * * # To remote node with revocation key * OP_DUP OP_HASH160 OP_EQUAL @@ -691,7 +691,7 @@ u8 *bitcoin_wscript_htlc_offer(const tal_t *ctx, * OP_ENDIF * OP_ENDIF * - * Or, with `option_anchor_outputs`: + * Or, with `option_anchors`: * * # To remote node with revocation key * OP_DUP OP_HASH160 OP_EQUAL @@ -859,7 +859,7 @@ u8 *bitcoin_wscript_anchor(const tal_t *ctx, u8 *script = tal_arr(ctx, u8, 0); /* BOLT #3: - * #### `to_local_anchor` and `to_remote_anchor` Output (option_anchor_outputs) + * #### `to_local_anchor` and `to_remote_anchor` Output (option_anchors) *... * OP_CHECKSIG OP_IFDUP * OP_NOTIF