1
0
mirror of https://github.com/lightning/bolts.git synced 2024-11-19 01:50:03 +01:00

BOLT 5: fix reversed penalty HTLC handling clauses, make it clearer.

HTLC outputs can be resolved by (1) using revocation key,
(2) timeout/preimage use if that's possible, or (3) the cheating party's
HTLC-success/HTLC-timeout tx (which we also specify that you have to
spend using revocation key).

Hopefully this is now clearer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2017-11-29 12:20:04 +10:30
parent e64a738f62
commit f1ac62c065

View File

@ -431,13 +431,14 @@ A node MUST resolve all unresolved outputs as follows:
This output is considered *resolved* by the *commitment transaction*. This output is considered *resolved* by the *commitment transaction*.
2. _B's main output_: The node MUST *resolve* this by spending using the 2. _B's main output_: The node MUST *resolve* this by spending using the
revocation key. revocation key.
3. _A's offered HTLCs_: The node MUST *resolve* this in one of three ways by spending: 3. _A's offered HTLCs_: The node MUST *resolve* these in one of three ways:
* the *commitment tx* using the payment revocation * spending using the payment revocation
* the *commitment tx* using the payment preimage if known * spending using any transaction once the HTLC timeout has passed
* the *HTLC-timeout tx* if B publishes them * by noting *B's HTLC-success transaction* if B publishes it
4. _B's offered HTLCs_: The node MUST *resolve* this in one of two ways by spending: 4. _B's offered HTLCs_: The node MUST *resolve* these in one of three ways:
* the *commitment tx* using the payment revocation * spending using the payment revocation
* the *commitment tx* once the HTLC timeout has passed. * spending using the payment preimage if known
* by noting *B's HTLC-timeout transaction* if B publishes it
5. _B's HTLC-timeout transaction_: The node MUST *resolve* this by 5. _B's HTLC-timeout transaction_: The node MUST *resolve* this by
spending using the revocation key. spending using the revocation key.
6. _B's HTLC-success transaction_: The node MUST *resolve* this by 6. _B's HTLC-success transaction_: The node MUST *resolve* this by