Browse Source

tools/generate-wire.py: strip trailing whitespace on lines, fix bolt quotes.

There's a lot of it, and it means we can't `make check-source` on
these files.

Also bring bolt quotes up-to-date.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
bump-pyln-proto
Rusty Russell 5 years ago
parent
commit
0e805427dc
  1. 3
      channeld/channeld_wiregen.c
  2. 3
      channeld/channeld_wiregen.h
  3. 3
      closingd/closingd_wiregen.c
  4. 3
      closingd/closingd_wiregen.h
  5. 3
      common/peer_status_wiregen.c
  6. 3
      common/peer_status_wiregen.h
  7. 3
      common/status_wiregen.c
  8. 3
      common/status_wiregen.h
  9. 3
      connectd/connectd_gossipd_wiregen.c
  10. 3
      connectd/connectd_gossipd_wiregen.h
  11. 3
      connectd/connectd_wiregen.c
  12. 3
      connectd/connectd_wiregen.h
  13. 3
      gossipd/gossip_store_wiregen.c
  14. 3
      gossipd/gossip_store_wiregen.h
  15. 3
      gossipd/gossipd_peerd_wiregen.c
  16. 3
      gossipd/gossipd_peerd_wiregen.h
  17. 3
      gossipd/gossipd_wiregen.c
  18. 3
      gossipd/gossipd_wiregen.h
  19. 3
      hsmd/hsmd_wiregen.c
  20. 3
      hsmd/hsmd_wiregen.h
  21. 3
      onchaind/onchaind_wiregen.c
  22. 3
      onchaind/onchaind_wiregen.h
  23. 3
      openingd/openingd_wiregen.c
  24. 3
      openingd/openingd_wiregen.h
  25. 8
      tools/gen/impl_template
  26. 3
      tools/generate-wire.py
  27. 3
      wire/common_wiregen.c
  28. 3
      wire/common_wiregen.h
  29. 3
      wire/onion_printgen.c
  30. 3
      wire/onion_printgen.h
  31. 11
      wire/onion_wiregen.c
  32. 3
      wire/onion_wiregen.h
  33. 3
      wire/peer_printgen.c
  34. 3
      wire/peer_printgen.h
  35. 67
      wire/peer_wiregen.c
  36. 3
      wire/peer_wiregen.h

3
channeld/channeld_wiregen.c

@ -1184,5 +1184,4 @@ bool fromwire_send_onionmsg(const tal_t *ctx, const void *p, u8 onion[1366], str
}
return cursor != NULL;
}
// SHA256STAMP:b336984ad884507c4624dec512a7ac93b4bfe92d543a1e077a1d2cf7d3c30fd3
// SHA256STAMP:b706854b9a5a26d5176006150ca8a0d18def0fe79a255b55383a3b5beb6f86af

3
channeld/channeld_wiregen.h

@ -229,5 +229,4 @@ bool fromwire_send_onionmsg(const tal_t *ctx, const void *p, u8 onion[1366], str
#endif /* LIGHTNING_CHANNELD_CHANNELD_WIREGEN_H */
// SHA256STAMP:b336984ad884507c4624dec512a7ac93b4bfe92d543a1e077a1d2cf7d3c30fd3
// SHA256STAMP:b706854b9a5a26d5176006150ca8a0d18def0fe79a255b55383a3b5beb6f86af

3
closingd/closingd_wiregen.c

@ -199,5 +199,4 @@ bool fromwire_closingd_complete(const void *p)
return false;
return cursor != NULL;
}
// SHA256STAMP:dbd3c58cd169d183d94e9b40e53243eb300e32d514f7891f332a117ff50f569c
// SHA256STAMP:b6e109cf1e06fb2421d1ee78a18015e2f4b8e0697509409357735aaba2a479a5

3
closingd/closingd_wiregen.h

@ -55,5 +55,4 @@ bool fromwire_closingd_complete(const void *p);
#endif /* LIGHTNING_CLOSINGD_CLOSINGD_WIREGEN_H */
// SHA256STAMP:dbd3c58cd169d183d94e9b40e53243eb300e32d514f7891f332a117ff50f569c
// SHA256STAMP:b6e109cf1e06fb2421d1ee78a18015e2f4b8e0697509409357735aaba2a479a5

3
common/peer_status_wiregen.c

@ -80,5 +80,4 @@ bool fromwire_status_peer_error(const tal_t *ctx, const void *p, struct channel_
fromwire_u8_array(&cursor, &plen, *error_for_them, len);
return cursor != NULL;
}
// SHA256STAMP:e956fdfdddc89d050229153e3db7a9539795b35b23d4c132f0f65eb0cc339d97
// SHA256STAMP:f544c3823afd22d04793aed1f57fdaa57eecb207d1ad8186d0259c24c391b138

3
common/peer_status_wiregen.h

@ -34,5 +34,4 @@ bool fromwire_status_peer_error(const tal_t *ctx, const void *p, struct channel_
#endif /* LIGHTNING_COMMON_PEER_STATUS_WIREGEN_H */
// SHA256STAMP:e956fdfdddc89d050229153e3db7a9539795b35b23d4c132f0f65eb0cc339d97
// SHA256STAMP:f544c3823afd22d04793aed1f57fdaa57eecb207d1ad8186d0259c24c391b138

3
common/status_wiregen.c

@ -191,5 +191,4 @@ bool fromwire_status_peer_billboard(const tal_t *ctx, const void *p, bool *perm,
*happenings = fromwire_wirestring(ctx, &cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:8459550d3539dee0f13d3c40aa017972987cd7901131fdaa1be05d393424636c
// SHA256STAMP:473107ef4898aae5b290a9b994c0d17122ece1cdf07f50e34bc10ad0f84bcbd6

3
common/status_wiregen.h

@ -53,5 +53,4 @@ bool fromwire_status_peer_billboard(const tal_t *ctx, const void *p, bool *perm,
#endif /* LIGHTNING_COMMON_STATUS_WIREGEN_H */
// SHA256STAMP:8459550d3539dee0f13d3c40aa017972987cd7901131fdaa1be05d393424636c
// SHA256STAMP:473107ef4898aae5b290a9b994c0d17122ece1cdf07f50e34bc10ad0f84bcbd6

3
connectd/connectd_gossipd_wiregen.c

@ -161,5 +161,4 @@ bool fromwire_gossipd_get_addrs_reply(const tal_t *ctx, const void *p, struct wi
fromwire_wireaddr(&cursor, &plen, *addrs + i);
return cursor != NULL;
}
// SHA256STAMP:ff16f166eb5fe1a4389c503645deeea4b3e782cc3fb3fda7c87fab32c7f2ee05
// SHA256STAMP:a1efacc8ceb430e230ca7a5fb382307f3f86d95ac6cd1d67596294f98adc63f3

3
connectd/connectd_gossipd_wiregen.h

@ -54,5 +54,4 @@ bool fromwire_gossipd_get_addrs_reply(const tal_t *ctx, const void *p, struct wi
#endif /* LIGHTNING_CONNECTD_CONNECTD_GOSSIPD_WIREGEN_H */
// SHA256STAMP:ff16f166eb5fe1a4389c503645deeea4b3e782cc3fb3fda7c87fab32c7f2ee05
// SHA256STAMP:a1efacc8ceb430e230ca7a5fb382307f3f86d95ac6cd1d67596294f98adc63f3

3
connectd/connectd_wiregen.c

@ -404,5 +404,4 @@ bool fromwire_connectd_dev_memleak_reply(const void *p, bool *leak)
*leak = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:63529c4b1d95e8cb69c017829e3269e72c0d884545ae67b925f424b231c9633a
// SHA256STAMP:ae6ae82d79526abc039896e90f677549a6acb73c0a2cd171f6658849025318b5

3
connectd/connectd_wiregen.h

@ -103,5 +103,4 @@ bool fromwire_connectd_dev_memleak_reply(const void *p, bool *leak);
#endif /* LIGHTNING_CONNECTD_CONNECTD_WIREGEN_H */
// SHA256STAMP:63529c4b1d95e8cb69c017829e3269e72c0d884545ae67b925f424b231c9633a
// SHA256STAMP:ae6ae82d79526abc039896e90f677549a6acb73c0a2cd171f6658849025318b5

3
gossipd/gossip_store_wiregen.c

@ -117,5 +117,4 @@ bool fromwire_gossip_store_delete_chan(const void *p, struct short_channel_id *s
fromwire_short_channel_id(&cursor, &plen, scid);
return cursor != NULL;
}
// SHA256STAMP:96e087792923799ac0e76d097bbf30972d627228742d69d9b1f90100cae8241a
// SHA256STAMP:6c656ed77dab897dd0f8a9bb0bbdc9bfc5ad61f82d7ec6800d0987f766213e73

3
gossipd/gossip_store_wiregen.h

@ -43,5 +43,4 @@ bool fromwire_gossip_store_delete_chan(const void *p, struct short_channel_id *s
#endif /* LIGHTNING_GOSSIPD_GOSSIP_STORE_WIREGEN_H */
// SHA256STAMP:96e087792923799ac0e76d097bbf30972d627228742d69d9b1f90100cae8241a
// SHA256STAMP:6c656ed77dab897dd0f8a9bb0bbdc9bfc5ad61f82d7ec6800d0987f766213e73

3
gossipd/gossipd_peerd_wiregen.c

@ -226,5 +226,4 @@ bool fromwire_gossipd_local_channel_announcement(const tal_t *ctx, const void *p
fromwire_u8_array(&cursor, &plen, *cannount, len);
return cursor != NULL;
}
// SHA256STAMP:8d8786f111a7dea8a44e064e382adf00265494b06cdf4cef1c6466bd03878b73
// SHA256STAMP:1ce1a60212ceeda5de7592f21328824690a16a1b6e59a4fc14e08fab9d355736

3
gossipd/gossipd_peerd_wiregen.h

@ -76,5 +76,4 @@ bool fromwire_gossipd_local_channel_announcement(const tal_t *ctx, const void *p
#endif /* LIGHTNING_GOSSIPD_GOSSIPD_PEERD_WIREGEN_H */
// SHA256STAMP:8d8786f111a7dea8a44e064e382adf00265494b06cdf4cef1c6466bd03878b73
// SHA256STAMP:1ce1a60212ceeda5de7592f21328824690a16a1b6e59a4fc14e08fab9d355736

3
gossipd/gossipd_wiregen.c

@ -857,5 +857,4 @@ bool fromwire_gossipd_new_blockheight(const void *p, u32 *blockheight)
*blockheight = fromwire_u32(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:9ac18b60ff39a11d7871d17a660aa9661a49d2585abe25d0ba0e048c32ac02eb
// SHA256STAMP:a494fd8a3f5ae31d113f387445744dd19490149be92d83f9bf61cc952457ad8f

3
gossipd/gossipd_wiregen.h

@ -199,5 +199,4 @@ bool fromwire_gossipd_new_blockheight(const void *p, u32 *blockheight);
#endif /* LIGHTNING_GOSSIPD_GOSSIPD_WIREGEN_H */
// SHA256STAMP:9ac18b60ff39a11d7871d17a660aa9661a49d2585abe25d0ba0e048c32ac02eb
// SHA256STAMP:a494fd8a3f5ae31d113f387445744dd19490149be92d83f9bf61cc952457ad8f

3
hsmd/hsmd_wiregen.c

@ -1214,5 +1214,4 @@ bool fromwire_hsmd_get_output_scriptpubkey_reply(const tal_t *ctx, const void *p
fromwire_u8_array(&cursor, &plen, *script, script_len);
return cursor != NULL;
}
// SHA256STAMP:a5ae76a1418b72d95fbb559fe568596318040de4e3726f2317969b9d9eee7788
// SHA256STAMP:6f67af9abcc4b8cd7fd2b0580341f72dd7ca323a4f1fa8fc02c97b83d63dec82

3
hsmd/hsmd_wiregen.h

@ -271,5 +271,4 @@ bool fromwire_hsmd_get_output_scriptpubkey_reply(const tal_t *ctx, const void *p
#endif /* LIGHTNING_HSMD_HSMD_WIREGEN_H */
// SHA256STAMP:a5ae76a1418b72d95fbb559fe568596318040de4e3726f2317969b9d9eee7788
// SHA256STAMP:6f67af9abcc4b8cd7fd2b0580341f72dd7ca323a4f1fa8fc02c97b83d63dec82

3
onchaind/onchaind_wiregen.c

@ -635,5 +635,4 @@ bool fromwire_onchaind_notify_coin_mvt(const void *p, struct chain_coin_mvt *mvt
fromwire_chain_coin_mvt(&cursor, &plen, mvt);
return cursor != NULL;
}
// SHA256STAMP:e21aeee2bb2e0c56f77595f7083aaacecdaf2b88b6808b33a63de4adcce58de8
// SHA256STAMP:9f47e39e5ad9fb20dd7aa39f76a630b3ee41e430620975be8077f7f47e6febe6

3
onchaind/onchaind_wiregen.h

@ -161,5 +161,4 @@ bool fromwire_onchaind_notify_coin_mvt(const void *p, struct chain_coin_mvt *mvt
#endif /* LIGHTNING_ONCHAIND_ONCHAIND_WIREGEN_H */
// SHA256STAMP:e21aeee2bb2e0c56f77595f7083aaacecdaf2b88b6808b33a63de4adcce58de8
// SHA256STAMP:9f47e39e5ad9fb20dd7aa39f76a630b3ee41e430620975be8077f7f47e6febe6

3
openingd/openingd_wiregen.c

@ -579,5 +579,4 @@ bool fromwire_openingd_dev_memleak_reply(const void *p, bool *leak)
*leak = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:164910f4bbe7967d43674158574280364e83db53c4487f5f470ac0d2a929f90b
// SHA256STAMP:8fda6ba9ec7bc264356849e91e6ad850ef2ee9c3dddf0dfdd7a2ac2cf4017abd

3
openingd/openingd_wiregen.h

@ -121,5 +121,4 @@ bool fromwire_openingd_dev_memleak_reply(const void *p, bool *leak);
#endif /* LIGHTNING_OPENINGD_OPENINGD_WIREGEN_H */
// SHA256STAMP:164910f4bbe7967d43674158574280364e83db53c4487f5f470ac0d2a929f90b
// SHA256STAMP:8fda6ba9ec7bc264356849e91e6ad850ef2ee9c3dddf0dfdd7a2ac2cf4017abd

8
tools/gen/impl_template

@ -296,9 +296,7 @@ bool fromwire_${tlv.name}(const u8 **cursor, size_t *max, struct ${tlv.struct_na
/* BOLT #1:
*
* A `varint` is a variable-length, unsigned integer encoding
* using the [BigSize](#appendix-a-bigsize-test-vectors)
* format
* The `type` is encoded using the BigSize format.
*/
field.numtype = fromwire_bigsize(cursor, max);
@ -396,7 +394,9 @@ bool ${tlv.name}_is_valid(const struct ${tlv.struct_name()} *record, size_t *err
return false;
} else if (!first && f->numtype <= prev_type) {
/* BOLT #1:
* - if decoded `type`s are not monotonically-increasing:
* - if decoded `type`s are not strictly-increasing
* (including situations when two or more occurrences
* of the same `type` are met):
* - MUST fail to parse the `tlv_stream`.
*/
if (f->numtype == prev_type)

3
tools/generate-wire.py

@ -537,7 +537,8 @@ class Master(object):
stuff['messages'] = list(self.messages.values()) + list(self.extension_msgs.values())
stuff['subtypes'] = subtypes
print(template.render(**stuff), file=output)
for line in template.render(**stuff).splitlines():
print(line.rstrip(), file=output)
def main(options, args=None, output=sys.stdout, lines=None):

3
wire/common_wiregen.c

@ -100,5 +100,4 @@ bool fromwire_custommsg_out(const tal_t *ctx, const void *p, u8 **msg)
fromwire_u8_array(&cursor, &plen, *msg, msg_len);
return cursor != NULL;
}
// SHA256STAMP:b7c32f920bcd5725670e679935629442e3866d3cba8e149d3269fec6835c1908
// SHA256STAMP:1526dd638eeeb6b2a5170d7135a8bd80d91bcfa2ce8afa337d31209616e6cb9a

3
wire/common_wiregen.h

@ -41,5 +41,4 @@ bool fromwire_custommsg_out(const tal_t *ctx, const void *p, u8 **msg);
#endif /* LIGHTNING_WIRE_COMMON_WIREGEN_H */
// SHA256STAMP:b7c32f920bcd5725670e679935629442e3866d3cba8e149d3269fec6835c1908
// SHA256STAMP:1526dd638eeeb6b2a5170d7135a8bd80d91bcfa2ce8afa337d31209616e6cb9a

3
wire/onion_printgen.c

@ -653,5 +653,4 @@ void printonion_wire_tlv_message(const char *tlv_name, const u8 *msg) {
printwire_tlvs(tlv_name, &msg, &plen, print_tlvs_tlv_payload, ARRAY_SIZE(print_tlvs_tlv_payload));
}
}
// SHA256STAMP:ceeead04b6dc0928c189be726bd2ea88561db5e91e69ba610ef76ed1ba9e552e
// SHA256STAMP:34ee8c689fc4081ab70cb70519583868d14057acdb69d1f3e242c4cfdbbbc39d

3
wire/onion_printgen.h

@ -57,5 +57,4 @@ void printwire_mpp_timeout(const char *fieldname, const u8 *cursor);
#endif /* LIGHTNING_WIRE_ONION_PRINTGEN_H */
// SHA256STAMP:ceeead04b6dc0928c189be726bd2ea88561db5e91e69ba610ef76ed1ba9e552e
// SHA256STAMP:34ee8c689fc4081ab70cb70519583868d14057acdb69d1f3e242c4cfdbbbc39d

11
wire/onion_wiregen.c

@ -233,9 +233,7 @@ bool fromwire_tlv_payload(const u8 **cursor, size_t *max, struct tlv_tlv_payload
/* BOLT #1:
*
* A `varint` is a variable-length, unsigned integer encoding
* using the [BigSize](#appendix-a-bigsize-test-vectors)
* format
* The `type` is encoded using the BigSize format.
*/
field.numtype = fromwire_bigsize(cursor, max);
@ -333,7 +331,9 @@ bool tlv_payload_is_valid(const struct tlv_tlv_payload *record, size_t *err_inde
return false;
} else if (!first && f->numtype <= prev_type) {
/* BOLT #1:
* - if decoded `type`s are not monotonically-increasing:
* - if decoded `type`s are not strictly-increasing
* (including situations when two or more occurrences
* of the same `type` are met):
* - MUST fail to parse the `tlv_stream`.
*/
if (f->numtype == prev_type)
@ -837,5 +837,4 @@ bool fromwire_mpp_timeout(const void *p)
return false;
return cursor != NULL;
}
// SHA256STAMP:ceeead04b6dc0928c189be726bd2ea88561db5e91e69ba610ef76ed1ba9e552e
// SHA256STAMP:34ee8c689fc4081ab70cb70519583868d14057acdb69d1f3e242c4cfdbbbc39d

3
wire/onion_wiregen.h

@ -207,5 +207,4 @@ bool fromwire_mpp_timeout(const void *p);
#endif /* LIGHTNING_WIRE_ONION_WIREGEN_H */
// SHA256STAMP:ceeead04b6dc0928c189be726bd2ea88561db5e91e69ba610ef76ed1ba9e552e
// SHA256STAMP:34ee8c689fc4081ab70cb70519583868d14057acdb69d1f3e242c4cfdbbbc39d

3
wire/peer_printgen.c

@ -2036,5 +2036,4 @@ void printpeer_wire_tlv_message(const char *tlv_name, const u8 *msg) {
printwire_tlvs(tlv_name, &msg, &plen, print_tlvs_reply_channel_range_tlvs, ARRAY_SIZE(print_tlvs_reply_channel_range_tlvs));
}
}
// SHA256STAMP:387ba235bbb8248b61a18b8fc1b7842f5ad47bbbb53cc8cf2bb2b8f872ce5a0d
// SHA256STAMP:521d619f25ebb8f49af991416c17ffbb6c9d2216cca98fe7be50824388d6bcac

3
wire/peer_printgen.h

@ -70,5 +70,4 @@ void printwire_gossip_timestamp_filter(const char *fieldname, const u8 *cursor);
void printwire_channel_update_checksums(const char *fieldname, const u8 **cursor, size_t *plen);
void printwire_channel_update_timestamps(const char *fieldname, const u8 **cursor, size_t *plen);
#endif /* LIGHTNING_WIRE_PEER_PRINTGEN_H */
// SHA256STAMP:387ba235bbb8248b61a18b8fc1b7842f5ad47bbbb53cc8cf2bb2b8f872ce5a0d
// SHA256STAMP:521d619f25ebb8f49af991416c17ffbb6c9d2216cca98fe7be50824388d6bcac

67
wire/peer_wiregen.c

@ -203,9 +203,7 @@ bool fromwire_init_tlvs(const u8 **cursor, size_t *max, struct tlv_init_tlvs *re
/* BOLT #1:
*
* A `varint` is a variable-length, unsigned integer encoding
* using the [BigSize](#appendix-a-bigsize-test-vectors)
* format
* The `type` is encoded using the BigSize format.
*/
field.numtype = fromwire_bigsize(cursor, max);
@ -303,7 +301,9 @@ bool init_tlvs_is_valid(const struct tlv_init_tlvs *record, size_t *err_index)
return false;
} else if (!first && f->numtype <= prev_type) {
/* BOLT #1:
* - if decoded `type`s are not monotonically-increasing:
* - if decoded `type`s are not strictly-increasing
* (including situations when two or more occurrences
* of the same `type` are met):
* - MUST fail to parse the `tlv_stream`.
*/
if (f->numtype == prev_type)
@ -475,9 +475,7 @@ bool fromwire_n1(const u8 **cursor, size_t *max, struct tlv_n1 *record)
/* BOLT #1:
*
* A `varint` is a variable-length, unsigned integer encoding
* using the [BigSize](#appendix-a-bigsize-test-vectors)
* format
* The `type` is encoded using the BigSize format.
*/
field.numtype = fromwire_bigsize(cursor, max);
@ -575,7 +573,9 @@ bool n1_is_valid(const struct tlv_n1 *record, size_t *err_index)
return false;
} else if (!first && f->numtype <= prev_type) {
/* BOLT #1:
* - if decoded `type`s are not monotonically-increasing:
* - if decoded `type`s are not strictly-increasing
* (including situations when two or more occurrences
* of the same `type` are met):
* - MUST fail to parse the `tlv_stream`.
*/
if (f->numtype == prev_type)
@ -694,9 +694,7 @@ bool fromwire_n2(const u8 **cursor, size_t *max, struct tlv_n2 *record)
/* BOLT #1:
*
* A `varint` is a variable-length, unsigned integer encoding
* using the [BigSize](#appendix-a-bigsize-test-vectors)
* format
* The `type` is encoded using the BigSize format.
*/
field.numtype = fromwire_bigsize(cursor, max);
@ -794,7 +792,9 @@ bool n2_is_valid(const struct tlv_n2 *record, size_t *err_index)
return false;
} else if (!first && f->numtype <= prev_type) {
/* BOLT #1:
* - if decoded `type`s are not monotonically-increasing:
* - if decoded `type`s are not strictly-increasing
* (including situations when two or more occurrences
* of the same `type` are met):
* - MUST fail to parse the `tlv_stream`.
*/
if (f->numtype == prev_type)
@ -888,9 +888,7 @@ bool fromwire_open_channel_tlvs(const u8 **cursor, size_t *max, struct tlv_open_
/* BOLT #1:
*
* A `varint` is a variable-length, unsigned integer encoding
* using the [BigSize](#appendix-a-bigsize-test-vectors)
* format
* The `type` is encoded using the BigSize format.
*/
field.numtype = fromwire_bigsize(cursor, max);
@ -988,7 +986,9 @@ bool open_channel_tlvs_is_valid(const struct tlv_open_channel_tlvs *record, size
return false;
} else if (!first && f->numtype <= prev_type) {
/* BOLT #1:
* - if decoded `type`s are not monotonically-increasing:
* - if decoded `type`s are not strictly-increasing
* (including situations when two or more occurrences
* of the same `type` are met):
* - MUST fail to parse the `tlv_stream`.
*/
if (f->numtype == prev_type)
@ -1082,9 +1082,7 @@ bool fromwire_accept_channel_tlvs(const u8 **cursor, size_t *max, struct tlv_acc
/* BOLT #1:
*
* A `varint` is a variable-length, unsigned integer encoding
* using the [BigSize](#appendix-a-bigsize-test-vectors)
* format
* The `type` is encoded using the BigSize format.
*/
field.numtype = fromwire_bigsize(cursor, max);
@ -1182,7 +1180,9 @@ bool accept_channel_tlvs_is_valid(const struct tlv_accept_channel_tlvs *record,
return false;
} else if (!first && f->numtype <= prev_type) {
/* BOLT #1:
* - if decoded `type`s are not monotonically-increasing:
* - if decoded `type`s are not strictly-increasing
* (including situations when two or more occurrences
* of the same `type` are met):
* - MUST fail to parse the `tlv_stream`.
*/
if (f->numtype == prev_type)
@ -1280,9 +1280,7 @@ bool fromwire_query_short_channel_ids_tlvs(const u8 **cursor, size_t *max, struc
/* BOLT #1:
*
* A `varint` is a variable-length, unsigned integer encoding
* using the [BigSize](#appendix-a-bigsize-test-vectors)
* format
* The `type` is encoded using the BigSize format.
*/
field.numtype = fromwire_bigsize(cursor, max);
@ -1380,7 +1378,9 @@ bool query_short_channel_ids_tlvs_is_valid(const struct tlv_query_short_channel_
return false;
} else if (!first && f->numtype <= prev_type) {
/* BOLT #1:
* - if decoded `type`s are not monotonically-increasing:
* - if decoded `type`s are not strictly-increasing
* (including situations when two or more occurrences
* of the same `type` are met):
* - MUST fail to parse the `tlv_stream`.
*/
if (f->numtype == prev_type)
@ -1475,9 +1475,7 @@ bool fromwire_query_channel_range_tlvs(const u8 **cursor, size_t *max, struct tl
/* BOLT #1:
*
* A `varint` is a variable-length, unsigned integer encoding
* using the [BigSize](#appendix-a-bigsize-test-vectors)
* format
* The `type` is encoded using the BigSize format.
*/
field.numtype = fromwire_bigsize(cursor, max);
@ -1575,7 +1573,9 @@ bool query_channel_range_tlvs_is_valid(const struct tlv_query_channel_range_tlvs
return false;
} else if (!first && f->numtype <= prev_type) {
/* BOLT #1:
* - if decoded `type`s are not monotonically-increasing:
* - if decoded `type`s are not strictly-increasing
* (including situations when two or more occurrences
* of the same `type` are met):
* - MUST fail to parse the `tlv_stream`.
*/
if (f->numtype == prev_type)
@ -1701,9 +1701,7 @@ bool fromwire_reply_channel_range_tlvs(const u8 **cursor, size_t *max, struct tl
/* BOLT #1:
*
* A `varint` is a variable-length, unsigned integer encoding
* using the [BigSize](#appendix-a-bigsize-test-vectors)
* format
* The `type` is encoded using the BigSize format.
*/
field.numtype = fromwire_bigsize(cursor, max);
@ -1801,7 +1799,9 @@ bool reply_channel_range_tlvs_is_valid(const struct tlv_reply_channel_range_tlvs
return false;
} else if (!first && f->numtype <= prev_type) {
/* BOLT #1:
* - if decoded `type`s are not monotonically-increasing:
* - if decoded `type`s are not strictly-increasing
* (including situations when two or more occurrences
* of the same `type` are met):
* - MUST fail to parse the `tlv_stream`.
*/
if (f->numtype == prev_type)
@ -2750,5 +2750,4 @@ bool fromwire_channel_update_option_channel_htlc_max(const void *p, secp256k1_ec
*htlc_maximum_msat = fromwire_amount_msat(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:387ba235bbb8248b61a18b8fc1b7842f5ad47bbbb53cc8cf2bb2b8f872ce5a0d
// SHA256STAMP:521d619f25ebb8f49af991416c17ffbb6c9d2216cca98fe7be50824388d6bcac

3
wire/peer_wiregen.h

@ -595,5 +595,4 @@ bool fromwire_channel_update_option_channel_htlc_max(const void *p, secp256k1_ec
#endif /* LIGHTNING_WIRE_PEER_WIREGEN_H */
// SHA256STAMP:387ba235bbb8248b61a18b8fc1b7842f5ad47bbbb53cc8cf2bb2b8f872ce5a0d
// SHA256STAMP:521d619f25ebb8f49af991416c17ffbb6c9d2216cca98fe7be50824388d6bcac

Loading…
Cancel
Save