mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 08:34:20 +01:00
Documentation: Update to BOLT v1.0.
Mainly typo fixes, but we removed the INCORRECT_PAYMENT_AMOUNT error altogether. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
f48fe03815
commit
6765423393
2
Makefile
2
Makefile
@@ -15,7 +15,7 @@ CCANDIR := ccan
|
|||||||
|
|
||||||
# Where we keep the BOLT RFCs
|
# Where we keep the BOLT RFCs
|
||||||
BOLTDIR := ../lightning-rfc/
|
BOLTDIR := ../lightning-rfc/
|
||||||
BOLTVERSION := 3fef98d10695462edecc63cba05e4a96374f4664
|
BOLTVERSION := da71867c840abe057d7a68f358dd9493e0e79110
|
||||||
|
|
||||||
-include config.vars
|
-include config.vars
|
||||||
|
|
||||||
|
|||||||
@@ -908,9 +908,6 @@ static u8 *make_failmsg(const tal_t *ctx,
|
|||||||
case WIRE_INVALID_ONION_KEY:
|
case WIRE_INVALID_ONION_KEY:
|
||||||
msg = towire_invalid_onion_key(ctx, sha256);
|
msg = towire_invalid_onion_key(ctx, sha256);
|
||||||
goto done;
|
goto done;
|
||||||
case WIRE_INCORRECT_PAYMENT_AMOUNT:
|
|
||||||
/* Deprecated: we should never make this any more! */
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
status_failed(STATUS_FAIL_INTERNAL_ERROR,
|
status_failed(STATUS_FAIL_INTERNAL_ERROR,
|
||||||
"Asked to create failmsg %u (%s)",
|
"Asked to create failmsg %u (%s)",
|
||||||
@@ -971,8 +968,7 @@ static secp256k1_ecdsa_signature *calc_commitsigs(const tal_t *ctx,
|
|||||||
* A sending node:
|
* A sending node:
|
||||||
*...
|
*...
|
||||||
* - MUST include one `htlc_signature` for every HTLC transaction
|
* - MUST include one `htlc_signature` for every HTLC transaction
|
||||||
* corresponding to BIP69 lexicographic ordering of the commitment
|
* corresponding to the ordering of the commitment transaction
|
||||||
* transaction.
|
|
||||||
*/
|
*/
|
||||||
htlc_sigs = tal_arr(ctx, secp256k1_ecdsa_signature, tal_count(txs) - 1);
|
htlc_sigs = tal_arr(ctx, secp256k1_ecdsa_signature, tal_count(txs) - 1);
|
||||||
|
|
||||||
@@ -2243,7 +2239,7 @@ static void peer_reconnect(struct peer *peer,
|
|||||||
* receiving node has sent:
|
* receiving node has sent:
|
||||||
* - SHOULD fail the channel.
|
* - SHOULD fail the channel.
|
||||||
* - if it has not sent `revoke_and_ack`, AND
|
* - if it has not sent `revoke_and_ack`, AND
|
||||||
* `next_remote_revocation_number` is equal to 0:
|
* `next_remote_revocation_number` is not equal to 0:
|
||||||
* - SHOULD fail the channel.
|
* - SHOULD fail the channel.
|
||||||
*/
|
*/
|
||||||
if (next_remote_revocation_number == peer->next_index[LOCAL] - 2) {
|
if (next_remote_revocation_number == peer->next_index[LOCAL] - 2) {
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx,
|
|||||||
|
|
||||||
/* BOLT #3:
|
/* BOLT #3:
|
||||||
*
|
*
|
||||||
* 7. Sort the outputs into [BIP 69
|
* 7. Sort the outputs into [BIP 69+CLTV
|
||||||
* order](#transaction-input-and-output-ordering)
|
* order](#transaction-input-and-output-ordering)
|
||||||
*/
|
*/
|
||||||
permute_outputs(tx->output, cltvs, (const void **)*htlcmap);
|
permute_outputs(tx->output, cltvs, (const void **)*htlcmap);
|
||||||
|
|||||||
@@ -379,8 +379,8 @@ static enum channel_add_err add_htlc(struct channel *channel,
|
|||||||
|
|
||||||
/* BOLT #2:
|
/* BOLT #2:
|
||||||
*
|
*
|
||||||
* - if a sending node adds more than its `max_accepted_htlcs` HTLCs to
|
* - if a sending node adds more than receiver `max_accepted_htlcs`
|
||||||
* its local commitment transaction...
|
* HTLCs to its local commitment transaction...
|
||||||
* - SHOULD fail the channel.
|
* - SHOULD fail the channel.
|
||||||
*/
|
*/
|
||||||
if (tal_count(committed) - tal_count(removing) + tal_count(adding)
|
if (tal_count(committed) - tal_count(removing) + tal_count(adding)
|
||||||
@@ -406,7 +406,7 @@ static enum channel_add_err add_htlc(struct channel *channel,
|
|||||||
|
|
||||||
/* BOLT #2:
|
/* BOLT #2:
|
||||||
*
|
*
|
||||||
* - if a sending node... adds more than its
|
* - if a sending node... adds more than receiver
|
||||||
* `max_htlc_value_in_flight_msat` worth of offered HTLCs to its
|
* `max_htlc_value_in_flight_msat` worth of offered HTLCs to its
|
||||||
* local commitment transaction:
|
* local commitment transaction:
|
||||||
* - SHOULD fail the channel.
|
* - SHOULD fail the channel.
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ static struct bitcoin_tx *htlc_tx(const tal_t *ctx,
|
|||||||
* ## HTLC-Timeout and HTLC-Success Transactions
|
* ## HTLC-Timeout and HTLC-Success Transactions
|
||||||
*
|
*
|
||||||
* These HTLC transactions are almost identical, except the
|
* These HTLC transactions are almost identical, except the
|
||||||
* HTLC-timeout transaction is timelocked. The HTLC-timeout
|
* HTLC-timeout transaction is timelocked. Both
|
||||||
* transaction is also the transaction that can be spent by a valid
|
* HTLC-timeout/HTLC-success transactions can be spent by a valid
|
||||||
* penalty transaction.
|
* penalty transaction.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ struct bitcoin_tx *initial_commit_tx(const tal_t *ctx,
|
|||||||
|
|
||||||
/* BOLT #3:
|
/* BOLT #3:
|
||||||
*
|
*
|
||||||
* 7. Sort the outputs into [BIP 69
|
* 7. Sort the outputs into [BIP 69+CLTV
|
||||||
* order](#transaction-input-and-output-ordering)
|
* order](#transaction-input-and-output-ordering)
|
||||||
*/
|
*/
|
||||||
permute_outputs(tx->output, NULL, NULL);
|
permute_outputs(tx->output, NULL, NULL);
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ static void handle_localpay(struct htlc_in *hin,
|
|||||||
*
|
*
|
||||||
* - if the amount paid is more than twice the amount expected:
|
* - if the amount paid is more than twice the amount expected:
|
||||||
* - SHOULD fail the HTLC.
|
* - SHOULD fail the HTLC.
|
||||||
* - SHOULD return an `incorrect_payment_amount` error.
|
* - SHOULD return an `incorrect_or_unknown_payment_details` error.
|
||||||
*/
|
*/
|
||||||
failcode = WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS;
|
failcode = WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ expiry_too_soon,0,len,2
|
|||||||
expiry_too_soon,2,channel_update,len
|
expiry_too_soon,2,channel_update,len
|
||||||
incorrect_or_unknown_payment_details,PERM|15
|
incorrect_or_unknown_payment_details,PERM|15
|
||||||
incorrect_or_unknown_payment_details,0,htlc_msat,8
|
incorrect_or_unknown_payment_details,0,htlc_msat,8
|
||||||
incorrect_payment_amount,PERM|16
|
|
||||||
final_expiry_too_soon,17
|
final_expiry_too_soon,17
|
||||||
final_incorrect_cltv_expiry,18
|
final_incorrect_cltv_expiry,18
|
||||||
final_incorrect_cltv_expiry,0,cltv_expiry,4
|
final_incorrect_cltv_expiry,0,cltv_expiry,4
|
||||||
|
|||||||
Reference in New Issue
Block a user