mirror of
https://github.com/lightning/bolts.git
synced 2025-02-20 13:34:43 +01:00
Clarify the sighash types for HTLC Success and Timeout transactions (#954)
This commit is contained in:
parent
29db92f334
commit
d975de1ba5
2 changed files with 3 additions and 3 deletions
|
@ -328,7 +328,7 @@ These HTLC transactions are almost identical, except the HTLC-timeout transactio
|
|||
* txout count: 1
|
||||
* `txout[0]` amount: the HTLC amount minus fees (see [Fee Calculation](#fee-calculation))
|
||||
* `txout[0]` script: version-0 P2WSH with witness script as shown below
|
||||
* if `option_anchors` applies to this commitment transaction, `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is used.
|
||||
* if `option_anchors` applies to this commitment transaction, `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is used as described in [BOLT #5](05-onchain.md#generation-of-htlc-transactions).
|
||||
|
||||
The witness script for the output is:
|
||||
|
||||
|
|
|
@ -594,8 +594,8 @@ If `option_anchors` does not apply to the commitment transaction, then
|
|||
HTLC-timeout and HTLC-success transactions are complete transactions with
|
||||
(hopefully!) reasonable fees and must be used directly.
|
||||
|
||||
Otherwise, the use of `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` on the HTLC
|
||||
signatures received from the peer allows HTLC transactions to be combined with
|
||||
Otherwise, `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` MUST be used on the
|
||||
HTLC signatures received from the peer, as this allows HTLC transactions to be combined with
|
||||
other transactions. The local signature MUST use `SIGHASH_ALL`, otherwise
|
||||
anyone can attach additional inputs and outputs to the tx.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue