Edited 08_routing_htlcs.asciidoc with Atlas code editor

pull/899/head
kristen@oreilly.com 3 years ago
parent 1eff08306f
commit ce268100db

@ -335,7 +335,7 @@ Dina's node will calculate a cryptographic hash of +R+, such that:
H = SHA256(R)
----
In <<payment_hash_and_preimage>> +H+ is the hash, or _payment hash_ and +R+ is the secret or _payment pre-image_.
In this code, +H+ is the hash, or _payment hash_ and +R+ is the secret or _payment pre-image_.
The use of a cryptographic hash function is one element that guarantees _trustless operation_. The payment intermediaries do not need to trust each other because they know that no one can guess the secret or fake it.
@ -353,6 +353,7 @@ Let's see how we would implement this as an HTLC in Bitcoin Script. In <<receive
[[received_htlc]]
.HTLC implemented in Bitcoin Script (BOLT3)
[source,text,linenums]
====
----
# To remote node with revocation key
OP_DUP OP_HASH160 <RIPEMD160(SHA256(revocationpubkey))> OP_EQUAL
@ -371,6 +372,7 @@ OP_ELSE
OP_ENDIF
OP_ENDIF
----
====
Wow that looks complicated! Don't worry though, we will take it one step at a time and simplify it.

Loading…
Cancel
Save