doc: fix up bolt12 quotes.

The one about size needs the offers PR rebased onto the latest
onion-message PR.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-07-05 20:57:39 +09:30 committed by neil saitug
parent 3b40bfa801
commit 2aa833d424
5 changed files with 9 additions and 15 deletions

View File

@ -196,10 +196,10 @@ void merkle_tlv(const struct tlv_field *fields, struct sha256 *merkle)
* Each form is signed using one or more TLV signature elements; TLV
* types 240 through 1000 are considered signature elements. For these
* the tag is `lightning` | `messagename` | `fieldname`, and `msg` is the
* merkle-root; `lightning` is the literal 9-byte ASCII string,
* `messagename` is the name of the TLV stream being signed (i.e. `offer`
* or `invoice`) and the `fieldname` is the TLV field containing the
* signature (e.g. `signature` or `recurrence_signature`).
* Merkle-root; `lightning` is the literal 9-byte ASCII string,
* `messagename` is the name of the TLV stream being signed (i.e. `offer`,
* `invoice_request` or `invoice`) and the `fieldname` is the TLV field
* containing the signature (e.g. `signature` or `payer_signature`).
*/
void sighash_from_merkle(const char *messagename,
const char *fieldname,

View File

@ -437,7 +437,7 @@ static struct command_result *json_send_onion_message(struct command *cmd,
hops[i].rawtlv, tal_bytelen(hops[i].rawtlv));
sphinx_add_hop(sphinx_path, &hops[i].id, take(tlv_with_len));
}
/* BOLT-offers #4:
/* BOLT-onion-message #4:
* - SHOULD set `len` to 1366 or 32834.
*/
if (sphinx_path_payloads_size(sphinx_path) <= ROUTING_INFO_SIZE)

View File

@ -496,10 +496,9 @@ static struct command_result *param_offer(struct command *cmd,
/* BOLT-offers #12:
*
* - if `node_id`, `description` or `signature` is not set:
* - if `node_id` or `description` is not set:
* - MUST NOT respond to the offer.
*/
/* Note: offer_decode checks `signature` */
if (!(*offer)->node_id)
return command_fail_badparam(cmd, name, buffer, tok,
"Offer does not contain a node_id");
@ -925,7 +924,7 @@ static struct command_result *json_fetchinvoice(struct command *cmd,
sent->wait_timeout = *timeout;
/* BOLT-offers #12:
* - MUST set `offer_id` to the merkle root of the offer as described
* - MUST set `offer_id` to the Merkle root of the offer as described
* in [Signature Calculation](#signature-calculation).
*/
invreq->offer_id = tal(invreq, struct sha256);
@ -1043,7 +1042,6 @@ static struct command_result *json_fetchinvoice(struct command *cmd,
/* BOLT-offers #12:
* - otherwise:
* - MUST NOT set `recurrence_counter`.
*...
* - MUST NOT set `recurrence_start`
*/
if (invreq->recurrence_counter)

View File

@ -311,7 +311,7 @@ static void json_add_offer(struct json_stream *js, const struct tlv_offer *offer
/* BOLT-offers #12:
* A reader of an offer:
*...
* - if `node_id`, `description` or `signature` is not set:
* - if `node_id` or `description` is not set:
* - MUST NOT respond to the offer.
*/
if (offer->description)

View File

@ -480,7 +480,7 @@ static struct command_result *invreq_base_amount_simple(struct command *cmd,
* - otherwise:
* - MUST fail the request if it does not contain `amount`.
* - MUST use the request `amount` as the *base invoice amount*.
* (Note: invoice amount can be further modiifed by recurrence
* (Note: invoice amount can be further modified by recurrence
* below)
*/
err = invreq_must_have(cmd, ir, amount);
@ -728,10 +728,6 @@ static struct command_result *listoffers_done(struct command *cmd,
* - if the offer had a `recurrence`:
* - MUST fail the request if there is no `recurrence_counter`
* field.
* - MUST fail the request if there is no
* `recurrence_signature` field.
* - MUST fail the request if `recurrence_signature` is not
* correct.
*/
err = invreq_must_have(cmd, ir, recurrence_counter);
if (err)