mirror of
https://github.com/lightning/bolts.git
synced 2025-03-13 11:35:41 +01:00
Allow setting nLockTime
, not nSequence
We always set `nSequence` to `0xFFFFFFFD`, but each node can choose the `nLockTime` they want to use for the transactions for which they are paying the fees.
This commit is contained in:
parent
3d9f0b8fad
commit
039f8ce99a
2 changed files with 6 additions and 8 deletions
|
@ -1750,7 +1750,7 @@ This process will be repeated every time a `shutdown` message is received, which
|
|||
2. data:
|
||||
* [`channel_id`:`channel_id`]
|
||||
* [`u64`:`fee_satoshis`]
|
||||
* [`u32`:`sequence`]
|
||||
* [`u32`:`locktime`]
|
||||
* [`closing_tlvs`:`tlvs`]
|
||||
|
||||
1. `tlv_stream`: `closing_tlvs`
|
||||
|
@ -1783,7 +1783,6 @@ Both nodes:
|
|||
The sender of `closing_complete` (aka. "the closer"):
|
||||
- MUST set `fee_satoshis` to a fee less than or equal to its outstanding balance, rounded down to whole satoshis.
|
||||
- MUST set `fee_satoshis` so that at least one output is not dust.
|
||||
- MUST set `sequence` to a value other than 0xFFFFFFFF.
|
||||
- MUST use the last send and received `shutdown` `scriptpubkey` to generate the closing transaction specified in [BOLT #3](03-transactions.md#closing-transaction).
|
||||
- If it sets `signature` fields, MUST set them as valid signature using its `funding_pubkey` of:
|
||||
- `closer_no_closee`: closing transaction with only the local ("closer") output.
|
||||
|
@ -1805,8 +1804,6 @@ The sender of `closing_complete` (aka. "the closer"):
|
|||
The receiver of `closing_complete` (aka. "the closee"):
|
||||
- If `fee_satoshis` is greater than the closer's outstanding balance:
|
||||
- MUST either send a `warning` and close the connection, or send an `error` and fail the channel.
|
||||
- If `sequence` is equal to 0xFFFFFFFF:
|
||||
- MUST either send a `warning` and close the connection, or send an `error` and fail the channel.
|
||||
- Select a signature for validation:
|
||||
- if the local output amount is dust:
|
||||
- MUST use `closer_no_closee`.
|
||||
|
|
|
@ -396,15 +396,16 @@ than twice `dust_limit_satoshis`.
|
|||
|
||||
This variant is used for `closing_complete` and `closing_sig` messages (i.e. where `option_simple_close` is negotiated).
|
||||
|
||||
In this case, the node sending `closing_complete` ("the closer") pays the fees, and the sequence specified to allow RBF. The outputs are ordered as detailed in [Transaction Output Ordering](#transaction-output-ordering).
|
||||
In this case, the node sending `closing_complete` ("the closer") pays the fees.
|
||||
The outputs are ordered as detailed in [Transaction Output Ordering](#transaction-output-ordering).
|
||||
|
||||
The side with lesser funds can opt to omit their own output.
|
||||
|
||||
* version: 2
|
||||
* locktime: 0
|
||||
* locktime: `locktime` from the `closing_complete` message
|
||||
* txin count: 1
|
||||
* `txin[0]` outpoint: `txid` and `output_index` from `funding_created` message
|
||||
* `txin[0]` sequence: `sequence` from `closing_complete` message
|
||||
* `txin[0]` outpoint: `txid` and `output_index` of the channel output
|
||||
* `txin[0]` sequence: 0xFFFFFFFD
|
||||
* `txin[0]` script bytes: 0
|
||||
* `txin[0]` witness: `0 <signature_for_pubkey1> <signature_for_pubkey2>`
|
||||
* txout count: 1 or 2
|
||||
|
|
Loading…
Add table
Reference in a new issue