diff --git a/Makefile b/Makefile index 9bd1c650a..5a47b3f10 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ CCANDIR := ccan # Where we keep the BOLT RFCs BOLTDIR := ../lightning-rfc/ -BOLTVERSION := 3fef98d10695462edecc63cba05e4a96374f4664 +BOLTVERSION := da71867c840abe057d7a68f358dd9493e0e79110 -include config.vars diff --git a/channeld/channeld.c b/channeld/channeld.c index 143cc01ca..19f18c69e 100644 --- a/channeld/channeld.c +++ b/channeld/channeld.c @@ -908,9 +908,6 @@ static u8 *make_failmsg(const tal_t *ctx, case WIRE_INVALID_ONION_KEY: msg = towire_invalid_onion_key(ctx, sha256); goto done; - case WIRE_INCORRECT_PAYMENT_AMOUNT: - /* Deprecated: we should never make this any more! */ - break; } status_failed(STATUS_FAIL_INTERNAL_ERROR, "Asked to create failmsg %u (%s)", @@ -971,8 +968,7 @@ static secp256k1_ecdsa_signature *calc_commitsigs(const tal_t *ctx, * A sending node: *... * - MUST include one `htlc_signature` for every HTLC transaction - * corresponding to BIP69 lexicographic ordering of the commitment - * transaction. + * corresponding to the ordering of the commitment transaction */ 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: * - SHOULD fail the channel. * - 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. */ if (next_remote_revocation_number == peer->next_index[LOCAL] - 2) { diff --git a/channeld/commit_tx.c b/channeld/commit_tx.c index a8c359a0b..30a50a01c 100644 --- a/channeld/commit_tx.c +++ b/channeld/commit_tx.c @@ -269,7 +269,7 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx, /* BOLT #3: * - * 7. Sort the outputs into [BIP 69 + * 7. Sort the outputs into [BIP 69+CLTV * order](#transaction-input-and-output-ordering) */ permute_outputs(tx->output, cltvs, (const void **)*htlcmap); diff --git a/channeld/full_channel.c b/channeld/full_channel.c index 071cca822..da173c296 100644 --- a/channeld/full_channel.c +++ b/channeld/full_channel.c @@ -379,8 +379,8 @@ static enum channel_add_err add_htlc(struct channel *channel, /* BOLT #2: * - * - if a sending node adds more than its `max_accepted_htlcs` HTLCs to - * its local commitment transaction... + * - if a sending node adds more than receiver `max_accepted_htlcs` + * HTLCs to its local commitment transaction... * - SHOULD fail the channel. */ 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: * - * - 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 * local commitment transaction: * - SHOULD fail the channel. diff --git a/common/htlc_tx.c b/common/htlc_tx.c index 2689b38a7..9ed0a504c 100644 --- a/common/htlc_tx.c +++ b/common/htlc_tx.c @@ -23,8 +23,8 @@ static struct bitcoin_tx *htlc_tx(const tal_t *ctx, * ## HTLC-Timeout and HTLC-Success Transactions * * These HTLC transactions are almost identical, except the - * HTLC-timeout transaction is timelocked. The HTLC-timeout - * transaction is also the transaction that can be spent by a valid + * HTLC-timeout transaction is timelocked. Both + * HTLC-timeout/HTLC-success transactions can be spent by a valid * penalty transaction. */ diff --git a/common/initial_commit_tx.c b/common/initial_commit_tx.c index 592ecff48..6a66536a8 100644 --- a/common/initial_commit_tx.c +++ b/common/initial_commit_tx.c @@ -196,7 +196,7 @@ struct bitcoin_tx *initial_commit_tx(const tal_t *ctx, /* BOLT #3: * - * 7. Sort the outputs into [BIP 69 + * 7. Sort the outputs into [BIP 69+CLTV * order](#transaction-input-and-output-ordering) */ permute_outputs(tx->output, NULL, NULL); diff --git a/lightningd/peer_htlcs.c b/lightningd/peer_htlcs.c index 5894441fc..51f67aed4 100644 --- a/lightningd/peer_htlcs.c +++ b/lightningd/peer_htlcs.c @@ -317,7 +317,7 @@ static void handle_localpay(struct htlc_in *hin, * * - if the amount paid is more than twice the amount expected: * - 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; goto fail; diff --git a/wire/gen_onion_wire_csv b/wire/gen_onion_wire_csv index 1dd767485..547c90f4b 100644 --- a/wire/gen_onion_wire_csv +++ b/wire/gen_onion_wire_csv @@ -32,7 +32,6 @@ expiry_too_soon,0,len,2 expiry_too_soon,2,channel_update,len incorrect_or_unknown_payment_details,PERM|15 incorrect_or_unknown_payment_details,0,htlc_msat,8 -incorrect_payment_amount,PERM|16 final_expiry_too_soon,17 final_incorrect_cltv_expiry,18 final_incorrect_cltv_expiry,0,cltv_expiry,4