Edited 08_routing_htlcs.asciidoc with Atlas code editor

pull/910/head
kristen@oreilly.com 3 years ago
parent bef3db5e57
commit eb4c20c3cc

@ -342,6 +342,7 @@ ____
_Alice will reimburse Bob with 12 gold coins if you can show a valid message that hashes to:_ +0575...f6b3+. _Bob has 24 hours to show the secret after the contract was signed. If Bob does not provide the secret by this time, Alice's deposit will be refunded by the escrow service and the contract becomes invalid._
____
[role="pagebreak-before"]
Let's see how we would implement this as an HTLC in Bitcoin Script. In <<received_htlc>> we see an HTLC Bitcoin Script as currently used in the Lightning Network. You can find this definition in https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#offered-htlc-outputs[BOLT #3, Transactions].
[[received_htlc]]
@ -542,6 +543,7 @@ H160 = 9e017f6767971ed7cea17f98528d5f5c0ccb2c71
Alice can calculate the RIPEMD160 hash of the payment hash that Dina provides and use the shorter hash in her HTLC, as can Bob and Chan!
[role="pagebreak-before"]
The "optimized" HTLC script would look like this:
----

Loading…
Cancel
Save