Skip to content

Instantly share code, notes, and snippets.

@matheusd
Created June 3, 2020 18:40
Show Gist options
  • Save matheusd/e78644b6758469d41baab9b5d9f620ea to your computer and use it in GitHub Desktop.
Save matheusd/e78644b6758469d41baab9b5d9f620ea to your computer and use it in GitHub Desktop.
Props to Pierre-Marie Padiou via https://github.com/lightningnetwork/lightning-rfc/issues/553#issuecomment-455641943
+------------+
| funding tx |
+------------+
|
| +-------------+
\--------| commit tx B |
+-------------+
| | | |
| | | | A's main output
| | | \------------------ to A
| | |
| | |
| | | ,-- to B (& delay)
| | | B's main output /
| | \----------------<
| | \
| | `-- to A (& revocation key)
| |
| | ,-- to B (& delay)
| | +-----------------+ /
| | ,--| HTLC-timeout tx |---<
| | HTLC offered by B / +-----------------+ \
| \-------------------< (after timeout) `-- to A (& revocation key)
| \
| `-- to A (& payment preimage)
| \
| `- to A (& revocation key)
|
| ,-- to B (& delay)
| +-----------------+ /
| ,--| HTLC-success tx |---<
| HTLC received by B / +-----------------+ \
\----------------------< (w/ payment preimage) `-- to A (& revocation key)
\
`-- to A (after timeout)
\
`- to A (& revocation key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment