mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
doc: update BOLTs to latest master.
Just typo fixes and the like. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
1c685ce3e8
commit
7e789be0ea
2
Makefile
2
Makefile
@ -24,7 +24,7 @@ CCANDIR := ccan
|
||||
|
||||
# Where we keep the BOLT RFCs
|
||||
BOLTDIR := ../lightning-rfc/
|
||||
DEFAULT_BOLTVERSION := f6c4d7604150986894bcb46d67c5c88680740b12
|
||||
DEFAULT_BOLTVERSION := e60d594abf436e768116684080997a8d4f960263
|
||||
# Can be overridden on cmdline.
|
||||
BOLTVERSION := $(DEFAULT_BOLTVERSION)
|
||||
|
||||
|
@ -1107,7 +1107,7 @@ static struct bitcoin_signature *unraw_sigs(const tal_t *ctx,
|
||||
*...
|
||||
* * if `option_anchors` applies to this commitment
|
||||
* transaction, `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is
|
||||
* used.
|
||||
* used as described in [BOLT #5]
|
||||
*/
|
||||
if (option_anchor_outputs)
|
||||
sigs[i].sighash_type = SIGHASH_SINGLE|SIGHASH_ANYONECANPAY;
|
||||
@ -2468,8 +2468,7 @@ static void resend_commitment(struct peer *peer, struct changed_htlc *last)
|
||||
/* BOLT #2:
|
||||
*
|
||||
* A receiving node:
|
||||
* - if `option_static_remotekey` or `option_anchors` applies to the
|
||||
* commitment transaction:
|
||||
* - if `option_static_remotekey` applies to the commitment transaction:
|
||||
* - if `next_revocation_number` is greater than expected above, AND
|
||||
* `your_last_per_commitment_secret` is correct for that
|
||||
* `next_revocation_number` minus 1:
|
||||
@ -2515,7 +2514,7 @@ static void check_future_dataloss_fields(struct peer *peer,
|
||||
|
||||
/* BOLT #2:
|
||||
* - MUST NOT broadcast its commitment transaction.
|
||||
* - SHOULD fail the channel.
|
||||
* - SHOULD send an `error` to request the peer to fail the channel.
|
||||
* - SHOULD store `my_current_per_commitment_point` to
|
||||
* retrieve funds should the sending node broadcast its
|
||||
* commitment transaction on-chain.
|
||||
@ -2532,8 +2531,7 @@ static void check_future_dataloss_fields(struct peer *peer,
|
||||
/* BOLT #2:
|
||||
*
|
||||
* A receiving node:
|
||||
* - if `option_static_remotekey` or `option_anchors` applies to the
|
||||
* commitment transaction:
|
||||
* - if `option_static_remotekey` applies to the commitment transaction:
|
||||
* ...
|
||||
* - if `your_last_per_commitment_secret` does not match the expected values:
|
||||
* - SHOULD send an `error` and fail the channel.
|
||||
@ -2797,7 +2795,7 @@ skip_tlvs:
|
||||
* of the next `commitment_signed` it expects to receive.
|
||||
* - MUST set `next_revocation_number` to the commitment number
|
||||
* of the next `revoke_and_ack` message it expects to receive.
|
||||
* - if `option_static_remotekey` or `option_anchors` applies to the commitment transaction:
|
||||
* - if `option_static_remotekey` applies to the commitment transaction:
|
||||
* - MUST set `my_current_per_commitment_point` to a valid point.
|
||||
* - otherwise:
|
||||
* - MUST set `my_current_per_commitment_point` to its commitment
|
||||
|
@ -617,7 +617,8 @@ static enum channel_add_err add_htlc(struct channel *channel,
|
||||
*
|
||||
* - if a sending node adds more than receiver `max_accepted_htlcs`
|
||||
* HTLCs to its local commitment transaction...
|
||||
* - SHOULD fail the channel.
|
||||
* - SHOULD send a `warning` and close the connection, or send an
|
||||
* `error` and fail the channel.
|
||||
*/
|
||||
if (htlc_count + 1 > channel->config[recipient].max_accepted_htlcs) {
|
||||
return CHANNEL_ERR_TOO_MANY_HTLCS;
|
||||
|
@ -707,8 +707,10 @@ static void do_quickclose(struct amount_sat offer[NUM_SIDES],
|
||||
/* BOLT #2:
|
||||
* - if the message contains a `fee_range`:
|
||||
* - if there is no overlap between that and its own `fee_range`:
|
||||
* - SHOULD fail the connection
|
||||
* - SHOULD send a warning
|
||||
* - MUST fail the channel if it doesn't receive a satisfying `fee_range` after a reasonable amount of time
|
||||
*/
|
||||
/* (Note we satisfy the "MUST fail" by our close command unilteraltimeout) */
|
||||
if (!get_overlap(our_feerange, their_feerange, &overlap)) {
|
||||
peer_failed_warn(pps, channel_id,
|
||||
"Unable to agree on a feerate."
|
||||
|
@ -131,8 +131,7 @@ static const struct dependency feature_deps[] = {
|
||||
* `option_anchor_outputs` | ... | ... | `option_static_remotekey`
|
||||
*/
|
||||
{ OPT_ANCHOR_OUTPUTS, OPT_STATIC_REMOTEKEY },
|
||||
/* FIXME: This dep was added later! */
|
||||
/* BOLT-master #9:
|
||||
/* BOLT #9:
|
||||
* Name | Description | Context | Dependencies |
|
||||
*...
|
||||
* `option_anchors_zero_fee_htlc_tx` | ... | ... | `option_static_remotekey`
|
||||
|
@ -1124,7 +1124,7 @@ static u8 *handle_sign_local_htlc_tx(struct hsmd_client *c, const u8 *msg_in)
|
||||
* ## HTLC-Timeout and HTLC-Success Transactions
|
||||
*...
|
||||
* * if `option_anchors` applies to this commitment transaction,
|
||||
* `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is used.
|
||||
* `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is used as described in [BOLT #5]
|
||||
*/
|
||||
sign_tx_input(tx, 0, NULL, wscript, &htlc_privkey, &htlc_pubkey,
|
||||
option_anchor_outputs
|
||||
@ -1177,7 +1177,7 @@ static u8 *handle_sign_remote_htlc_tx(struct hsmd_client *c, const u8 *msg_in)
|
||||
* ## HTLC-Timeout and HTLC-Success Transactions
|
||||
*...
|
||||
* * if `option_anchors` applies to this commitment transaction,
|
||||
* `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is used.
|
||||
* `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is used as described in [BOLT #5]
|
||||
*/
|
||||
sign_tx_input(tx, 0, NULL, wscript, &htlc_privkey, &htlc_pubkey,
|
||||
option_anchor_outputs
|
||||
@ -1446,7 +1446,7 @@ static u8 *handle_sign_remote_htlc_to_us(struct hsmd_client *c,
|
||||
* ## HTLC-Timeout and HTLC-Success Transactions
|
||||
*...
|
||||
* * if `option_anchors` applies to this commitment transaction,
|
||||
* `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is used.
|
||||
* `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is used as described in [BOLT #5]
|
||||
*/
|
||||
return handle_sign_to_us_tx(
|
||||
c, msg_in, tx, &privkey, wscript,
|
||||
|
@ -3458,7 +3458,7 @@ static u8 *handle_funding_depth(struct state *state, u8 *msg)
|
||||
/* BOLT #2:
|
||||
*
|
||||
* A receiving node:
|
||||
* - if `option_static_remotekey` or `option_anchors` applies to the commitment transaction:
|
||||
* - if `option_static_remotekey` applies to the commitment transaction:
|
||||
* - if `next_revocation_number` is greater than expected above, AND
|
||||
* `your_last_per_commitment_secret` is correct for that
|
||||
* `next_revocation_number` minus 1:
|
||||
@ -3504,7 +3504,7 @@ check_future_dataloss_fields(struct state *state,
|
||||
|
||||
/* BOLT #2:
|
||||
* - MUST NOT broadcast its commitment transaction.
|
||||
* - SHOULD fail the channel.
|
||||
* - SHOULD send an `error` to request the peer to fail the channel.
|
||||
*/
|
||||
wire_sync_write(REQ_FD,
|
||||
take(towire_dualopend_fail_fallen_behind(NULL)));
|
||||
|
@ -869,7 +869,7 @@ wallet_htlc_sigs_load(const tal_t *ctx, struct wallet *w, u64 channelid,
|
||||
*...
|
||||
* * if `option_anchors` applies to this commitment
|
||||
* transaction, `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is
|
||||
* used.
|
||||
* used as described in [BOLT #5]
|
||||
*/
|
||||
if (option_anchor_outputs)
|
||||
sig.sighash_type = SIGHASH_SINGLE|SIGHASH_ANYONECANPAY;
|
||||
|
Loading…
Reference in New Issue
Block a user