Fix C comments which will accidentally trigger Python BOLT quote checker.
What changed, and why it matters
This commit only rewords C code comments to avoid confusing an internal Python tool that checks documentation quotes. No program behavior, network protocol handling, or security logic is changed. It is a code-comment cleanup with no security relevance.
No security action required. Treat as a normal documentation/comment hygiene commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch changes comment text in seven source files so that phrases like ‘/ BOLT #N … /’ and ‘/ BOLT11 … /’ no longer begin comments in a way that would match the project’s Python BOLT quote checker. It also removes a stray blank line inside a BOLT #7 comment block. No executable code, data structures, parsing logic, cryptography, or protocol state machine is modified.
Changed components
bitcoin/script.hlightningd/gossip_generation.clightningd/invoice.hlightningd/lightningd.cplugins/offers_offer.cplugins/test/run-decode_guess_type.cplugins/xpay/xpay.cInspect captured patch +11 / −11
diff --git a/bitcoin/script.h b/bitcoin/script.h
index 0c37c645..0711eb4e 100644
--- a/bitcoin/script.h
+++ b/bitcoin/script.h
@@ -102,13 +102,13 @@ u8 **bitcoin_witness_sig_and_element(const tal_t *ctx,
const void *elem, size_t elemsize,
const u8 *witnessscript);
-/* BOLT #3 to-local output */
+/* to-local output (BOLT #3) */
u8 *bitcoin_wscript_to_local(const tal_t *ctx, u16 to_self_delay,
u32 lease_remaining,
const struct pubkey *revocation_pubkey,
const struct pubkey *local_delayedkey);
-/* BOLT #3 offered/accepted HTLC outputs */
+/* offered/accepted HTLC outputs (BOLT #3) */
u8 *bitcoin_wscript_htlc_offer(const tal_t *ctx,
const struct pubkey *localhtlckey,
const struct pubkey *remotehtlckey,
@@ -151,7 +151,7 @@ u8 *bitcoin_wscript_htlc_receive_ripemd(const tal_t *ctx,
bool option_anchor_outputs,
bool option_anchors_zero_fee_htlc_tx);
-/* BOLT #3 HTLC-success/HTLC-timeout output */
+/* HTLC-success/HTLC-timeout output (BOLT #3) */
u8 *bitcoin_wscript_htlc_tx(const tal_t *ctx,
u16 to_self_delay,
const struct pubkey *revocation_pubkey,
diff --git a/lightningd/gossip_generation.c b/lightningd/gossip_generation.c
index 433f4fb8..ba7d00bc 100644
--- a/lightningd/gossip_generation.c
+++ b/lightningd/gossip_generation.c
@@ -89,7 +89,7 @@ u8 *unsigned_channel_update(const tal_t *ctx,
/* hsmd fills this in */
memset(&dummy_sig, 0, sizeof(dummy_sig));
/* BOLT #7:
-
+ *
* The `channel_flags` bitfield is used to indicate the direction of
* the channel: it identifies the node that this update originated
* from and signals various options concerning the channel. The
diff --git a/lightningd/invoice.h b/lightningd/invoice.h
index c7b24e11..9fee7ec9 100644
--- a/lightningd/invoice.h
+++ b/lightningd/invoice.h
@@ -31,7 +31,7 @@ struct invoice_details {
u64 paid_timestamp;
/* Set if state == PAID and invoice paid on chain; outpoint containing the payment */
const struct bitcoin_outpoint *paid_outpoint;
- /* BOLT11 or BOLT12 encoding for this invoice */
+ /* BOLT-11 or BOLT-12 encoding for this invoice */
const char *invstring;
/* The description of the payment. */
diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c
index 8847e663..7dba1153 100644
--- a/lightningd/lightningd.c
+++ b/lightningd/lightningd.c
@@ -883,7 +883,7 @@ static struct io_plan *sigchld_rfd_in(struct io_conn *conn,
* features later, or adding them when supplied by plugins. */
static struct feature_set *default_features(const tal_t *ctx)
{
- /* BOLT PR https://github.com/lightning/bolts/pull/1092
+ /* Proposed BOLT PR https://github.com/lightning/bolts/pull/1092
* suggests making the following compulsory:
* var_onion_optin (all but 6 nodes)
* gossip_queries (all but 11 nodes)
diff --git a/plugins/offers_offer.c b/plugins/offers_offer.c
index dd3a627c..59570e26 100644
--- a/plugins/offers_offer.c
+++ b/plugins/offers_offer.c
@@ -97,7 +97,7 @@ static struct command_result *param_amount(struct command *cmd,
return NULL;
}
-/* BOLT 13:
+/* Proposed BOLT #13:
* - MUST set `time_unit` to 0 (seconds), 1 (days), or 2 (months).
*/
struct time_string {
diff --git a/plugins/test/run-decode_guess_type.c b/plugins/test/run-decode_guess_type.c
index abeca0e2..991b44ad 100644
--- a/plugins/test/run-decode_guess_type.c
+++ b/plugins/test/run-decode_guess_type.c
@@ -242,7 +242,7 @@ int main(int argc, char *argv[])
common_setup(argv[0]);
static const struct likely_test tests[] = {
- /* BOLT12 */
+ /* BOLT-12 */
{ "lno1qqqqqq", LIKELY_BOLT12_OFFER },
{ "LNO1QQQQQQ", LIKELY_BOLT12_OFFER },
{ "lni1abcd", LIKELY_BOLT12_INV },
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
{ "clnemerg1foo", LIKELY_EMERGENCY_RECOVER },
{ "CLNEMERG1FOO", LIKELY_EMERGENCY_RECOVER },
- /* BOLT11 (lower + upper, amount + no amount) */
+ /* BOLT-11 (lower + upper, amount + no amount) */
{ "lnbc1qqqqqq", LIKELY_BOLT11 },
{ "LNBC1QQQQQQ", LIKELY_BOLT11 },
{ "lnbc10u1qqqqqq", LIKELY_BOLT11 },
diff --git a/plugins/xpay/xpay.c b/plugins/xpay/xpay.c
index e05e2df3..9a8d740f 100644
--- a/plugins/xpay/xpay.c
+++ b/plugins/xpay/xpay.c
@@ -89,9 +89,9 @@ struct payment {
u32 maxparts;
/* Do we have to do it all in a single part? */
bool disable_mpp;
- /* BOLT11 payment secret (NULL for BOLT12, it uses blinded paths) */
+ /* BOLT-11 payment secret (NULL for BOLT-12, it uses blinded paths) */
const struct secret *payment_secret;
- /* BOLT11 payment metadata (NULL for BOLT12, it uses blinded paths) */
+ /* BOLT-11 payment metadata (NULL for BOLT-12, it uses blinded paths) */
const u8 *payment_metadata;
/* Final CLTV value */
u32 final_cltv;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.