From 18a6cbd11f60a90d195e23df24473cefafb28ae7 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 17 Jun 2018 19:43:44 +0930 Subject: [PATCH] bitcoin/*: fix up BOLT references. Signed-off-by: Rusty Russell --- bitcoin/script.c | 52 ++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/bitcoin/script.c b/bitcoin/script.c index bfde69163..46693d1a2 100644 --- a/bitcoin/script.c +++ b/bitcoin/script.c @@ -452,19 +452,19 @@ u8 **bitcoin_witness_sig_and_element(const tal_t *ctx, /* BOLT #3: * - * This output sends funds back to the owner of this commitment transaction, + * This output sends funds back to the owner of this commitment transaction and * thus must be timelocked using `OP_CSV`. It can be claimed, without delay, - * by the other party if they know the revocation key. The output is a version - * 0 P2WSH, with a witness script: + * by the other party if they know the revocation private key. The output is a + * version-0 P2WSH, with a witness script: * * OP_IF * # Penalty transaction - * + * * OP_ELSE * `to_self_delay` * OP_CSV * OP_DROP - * + * * OP_ENDIF * OP_CHECKSIG */ @@ -489,21 +489,21 @@ u8 *bitcoin_wscript_to_local(const tal_t *ctx, u16 to_self_delay, * * #### Offered HTLC Outputs * - * This output sends funds to an HTLC-timeout transaction after the HTLC - * timeout, or to the remote peer using the payment preimage or the revocation - * key. The output is a P2WSH, with a witness script: + * 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: * - * # To you with revocation key - * OP_DUP OP_HASH160 OP_EQUAL + * # To remote node with revocation key + * OP_DUP OP_HASH160 OP_EQUAL * OP_IF * OP_CHECKSIG * OP_ELSE - * OP_SWAP OP_SIZE 32 OP_EQUAL + * OP_SWAP OP_SIZE 32 OP_EQUAL * OP_NOTIF - * # To me via HTLC-timeout transaction (timelocked). - * OP_DROP 2 OP_SWAP 2 OP_CHECKMULTISIG + * # To local node via HTLC-timeout transaction (timelocked). + * OP_DROP 2 OP_SWAP 2 OP_CHECKMULTISIG * OP_ELSE - * # To you with preimage. + * # To remote node with preimage. * OP_HASH160 OP_EQUALVERIFY * OP_CHECKSIG * OP_ENDIF @@ -568,23 +568,23 @@ u8 *bitcoin_wscript_htlc_offer(const tal_t *ctx, * * #### Received HTLC Outputs * - * This output sends funds to the remote peer 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: + * 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: * - * # To you with revocation key - * OP_DUP OP_HASH160 OP_EQUAL + * # To remote node with revocation key + * OP_DUP OP_HASH160 OP_EQUAL * OP_IF * OP_CHECKSIG * OP_ELSE - * OP_SWAP + * OP_SWAP * OP_SIZE 32 OP_EQUAL * OP_IF - * # To me via HTLC-success transaction. + * # To local node via HTLC-success transaction. * OP_HASH160 OP_EQUALVERIFY - * 2 OP_SWAP 2 OP_CHECKMULTISIG + * 2 OP_SWAP 2 OP_CHECKMULTISIG * OP_ELSE - * # To you after timeout. + * # To remote node after timeout. * OP_DROP OP_CHECKLOCKTIMEVERIFY OP_DROP * OP_CHECKSIG * OP_ENDIF @@ -655,7 +655,7 @@ u8 *bitcoin_wscript_htlc_receive(const tal_t *ctx, * ## HTLC-Timeout and HTLC-Success Transactions * *... - * * `txin[0]` witness stack: `0 ` for HTLC-Success, `0 0` for HTLC-Timeout. + * * `txin[0]` witness stack: `0 ` for HTLC-success, `0 0` for HTLC-timeout */ u8 **bitcoin_witness_htlc_timeout_tx(const tal_t *ctx, const secp256k1_ecdsa_signature *localhtlcsig, @@ -702,12 +702,12 @@ u8 *bitcoin_wscript_htlc_tx(const tal_t *ctx, * * OP_IF * # Penalty transaction - * + * * OP_ELSE * `to_self_delay` * OP_CSV * OP_DROP - * + * * OP_ENDIF * OP_CHECKSIG */