From 1aa56ce982d4b55ba2beb6c8fb0e541d9039d52d Mon Sep 17 00:00:00 2001 From: Will Binns Date: Wed, 24 Jan 2018 10:51:53 -0600 Subject: [PATCH] ch12: Fix mistake in HTLC contract definition Closes #476 --- ch12.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch12.asciidoc b/ch12.asciidoc index 3c609a9f..bfeed9e0 100644 --- a/ch12.asciidoc +++ b/ch12.asciidoc @@ -426,13 +426,13 @@ IF ELSE # Refund after timeout. CHECKLOCKTIMEVERIFY DROP - CHECKSIG + CHECKSIG ENDIF ---- Anyone who knows the secret +R+, which when hashed equals to +H+, can redeem this output by exercising the first clause of the +IF+ flow. -If the secret is not revealed and the HTLC claimed, after a certain number of blocks the payee can claim a refund using the second clause in the +IF+ flow. +If the secret is not revealed and the HTLC claimed, after a certain number of blocks the payer can claim a refund using the second clause in the +IF+ flow. This is a basic implementation of an HTLC. This type of HTLC can be redeemed by _anyone_ who has the secret +R+. An HTLC can take many different forms with slight variations to the script. For example, adding a +CHECKSIG+ operator and a public key in the first clause restricts redemption of the hash to a named recipient, who must also know the secret +R+.((("", startref="BCApayment12")))