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

Update 03-transactions.md

This commit is contained in:
Antoni Spaanderman 2022-05-22 18:40:39 +02:00 committed by Bastien Teinturier
parent bc86304b4b
commit 0c649ea1c2

View File

@ -47,7 +47,7 @@ This details the exact format of on-chain transactions, which both sides need to
## Transaction Output Ordering ## Transaction Output Ordering
Outputs in transactions are always sorted according to: Outputs in transactions are always sorted according to:
* first according to their value (in whole satoshis, note that for HTLC outputs, the millisatoshi part must be ignored) * first according to their value, smallest first (in whole satoshis, note that for HTLC outputs, the millisatoshi part must be ignored)
* followed by `scriptpubkey`, comparing the common-length prefix lexicographically as if by `memcmp`, then selecting the shorter script (if they differ in length), * followed by `scriptpubkey`, comparing the common-length prefix lexicographically as if by `memcmp`, then selecting the shorter script (if they differ in length),
* finally, for HTLC outputs, in increasing `cltv_expiry` order. * finally, for HTLC outputs, in increasing `cltv_expiry` order.