From e137e2527faad7348a483b5d189c16a117cd0987 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 9 Oct 2017 11:52:13 +1030 Subject: [PATCH] Update BOLT references with typo fixes. Signed-off-by: Rusty Russell --- channeld/channel.c | 2 +- channeld/full_channel.c | 3 ++- common/cryptomsg.c | 2 +- common/initial_channel.h | 2 +- lightningd/test/run-funding_tx.c | 4 ++-- onchaind/onchain.c | 2 +- openingd/opening.c | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/channeld/channel.c b/channeld/channel.c index f728790e7..463aeeddb 100644 --- a/channeld/channel.c +++ b/channeld/channel.c @@ -180,7 +180,7 @@ static void send_announcement_signatures(struct peer *peer) /* BOLT #7: * * If sent, `announcement_signatures` messages MUST NOT be sent until - * `funding_locked` has been sent, and the funding transaction is has + * `funding_locked` has been sent and the funding transaction has * at least 6 confirmations. */ if (!(peer->announce_depth_reached && peer->funding_locked[LOCAL])) diff --git a/channeld/full_channel.c b/channeld/full_channel.c index 9a73df313..734f51490 100644 --- a/channeld/full_channel.c +++ b/channeld/full_channel.c @@ -518,7 +518,8 @@ enum channel_remove_err channel_fulfill_htlc(struct channel *channel, * based on: */ /* BOLT #2: * - * A node MUST NOT send `update_fulfill_htlc` until an HTLC is + * A node MUST NOT send an `update_fulfill_htlc`, `update_fail_htlc` + * or `update_fail_malformed_htlc` until the corresponding HTLC is * irrevocably committed in both sides' commitment transactions. */ if (htlc->state == SENT_ADD_ACK_REVOCATION) diff --git a/common/cryptomsg.c b/common/cryptomsg.c index 341a31d08..86a603077 100644 --- a/common/cryptomsg.c +++ b/common/cryptomsg.c @@ -42,7 +42,7 @@ static void maybe_rotate_key(u64 *n, struct secret *k, struct secret *ck) /* BOLT #8: * - * A key is to be rotated after a party sends of decrypts + * A key is to be rotated after a party sends or decrypts * `1000` messages with it. This can be properly accounted * for by rotating the key once the nonce dedicated to it * exceeds `1000`. diff --git a/common/initial_channel.h b/common/initial_channel.h index a19f96d39..548d846e7 100644 --- a/common/initial_channel.h +++ b/common/initial_channel.h @@ -64,7 +64,7 @@ struct channel { /* BOLT #2: * - * `dust_limit_satoshis` is the threshold below which output should be + * `dust_limit_satoshis` is the threshold below which outputs should not be * generated for this node's commitment or HTLC transaction */ static inline u64 dust_limit_satoshis(const struct channel *channel, enum side side) diff --git a/lightningd/test/run-funding_tx.c b/lightningd/test/run-funding_tx.c index 83c3df1b9..d5942c52b 100644 --- a/lightningd/test/run-funding_tx.c +++ b/lightningd/test/run-funding_tx.c @@ -68,14 +68,14 @@ int main(void) assert(input); /* BOLT #3: - * Block 1 coinbase privkey: 6bd078650fcee8444e4e09825227b801a1ca928debb750eb36e6d56124bb20e80101 + * Block 1 coinbase privkey: 6bd078650fcee8444e4e09825227b801a1ca928debb750eb36e6d56124bb20e801 * # privkey in base58: cRCH7YNcarfvaiY1GWUKQrRGmoezvfAiqHtdRvxe16shzbd7LDMz */ if (!key_from_base58("cRCH7YNcarfvaiY1GWUKQrRGmoezvfAiqHtdRvxe16shzbd7LDMz", strlen("cRCH7YNcarfvaiY1GWUKQrRGmoezvfAiqHtdRvxe16shzbd7LDMz"), &testnet, &input_privkey, &inputkey)) abort(); assert(testnet); - printf("* Block 1 coinbase privkey: %s01\n", + printf("* Block 1 coinbase privkey: %s\n", type_to_string(tmpctx, struct privkey, &input_privkey)); /* BOLT #3: diff --git a/onchaind/onchain.c b/onchaind/onchain.c index 787df8a73..24c5f7099 100644 --- a/onchaind/onchain.c +++ b/onchaind/onchain.c @@ -863,7 +863,7 @@ static void handle_preimage(struct tracked_output **outs, /* BOLT #5: * * To spend an offered HTLC output: if the transaction is the - * nodes' own commitment transaction, then it MUST use the + * node's own commitment transaction, then it MUST use the * HTLC-success transaction, and the HTLC-success transaction * output MUST be *resolved* as described in "On-chain HTLC * Transaction Handling" diff --git a/openingd/opening.c b/openingd/opening.c index c9693d329..e924e741d 100644 --- a/openingd/opening.c +++ b/openingd/opening.c @@ -497,7 +497,7 @@ static u8 *fundee_channel(struct state *state, /* BOLT #2: * - * The receiving MUST reject the channel if the `chain_hash` value + * The receiving node MUST reject the channel if the `chain_hash` value * within the `open_channel` message is set to a hash of a chain * unknown to the receiver. */