Browse Source

tools/generate-wire: don't use void * pointers for tlv fromwire.

And fix up the one place which got it wrong.

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

2
channeld/channeld_wiregen.c

@ -1248,4 +1248,4 @@ bool fromwire_send_onionmsg(const tal_t *ctx, const void *p, u8 onion[1366], str
}
return cursor != NULL;
}
// SHA256STAMP:c520ab3f9f3c5e7a7b1cdd7535bd95ee82a7b352602da56eb37d603a1890fd46
// SHA256STAMP:67432ca0aef376273ef2057a16fa75711b248eb33191ec4de63d8c9a537e2757

2
channeld/channeld_wiregen.h

@ -246,4 +246,4 @@ bool fromwire_send_onionmsg(const tal_t *ctx, const void *p, u8 onion[1366], str
#endif /* LIGHTNING_CHANNELD_CHANNELD_WIREGEN_H */
// SHA256STAMP:c520ab3f9f3c5e7a7b1cdd7535bd95ee82a7b352602da56eb37d603a1890fd46
// SHA256STAMP:67432ca0aef376273ef2057a16fa75711b248eb33191ec4de63d8c9a537e2757

2
closingd/closingd_wiregen.c

@ -201,4 +201,4 @@ bool fromwire_closingd_complete(const void *p)
return false;
return cursor != NULL;
}
// SHA256STAMP:c9a8c207d4b03e4a8a63e24b8cf04bdcdce031f05ce238c23d66861736d38093
// SHA256STAMP:e6800a03e1351462b19de79fdc56a2866bc5de80d229065dc6d2685b458b5611

2
closingd/closingd_wiregen.h

@ -56,4 +56,4 @@ bool fromwire_closingd_complete(const void *p);
#endif /* LIGHTNING_CLOSINGD_CLOSINGD_WIREGEN_H */
// SHA256STAMP:c9a8c207d4b03e4a8a63e24b8cf04bdcdce031f05ce238c23d66861736d38093
// SHA256STAMP:e6800a03e1351462b19de79fdc56a2866bc5de80d229065dc6d2685b458b5611

2
common/peer_status_wiregen.c

@ -80,4 +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:81ce8c48fa95942e161b6a69f86271f538f58e32c09ae4da068c4061d0cfcc87
// SHA256STAMP:c422e1bdb12318ac77a581f0e23ef5f9b41c24524b01d9a786c47c5809eea76b

2
common/peer_status_wiregen.h

@ -34,4 +34,4 @@ bool fromwire_status_peer_error(const tal_t *ctx, const void *p, struct channel_
#endif /* LIGHTNING_COMMON_PEER_STATUS_WIREGEN_H */
// SHA256STAMP:81ce8c48fa95942e161b6a69f86271f538f58e32c09ae4da068c4061d0cfcc87
// SHA256STAMP:c422e1bdb12318ac77a581f0e23ef5f9b41c24524b01d9a786c47c5809eea76b

2
common/status_wiregen.c

@ -191,4 +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:adfe96ff3b9661f179d937c93c5457c38f20d1caeaaa646326ca0c6d5496a35c
// SHA256STAMP:9d44fada024f78edb1b187537bbf25a5d2e830cff9c822086aa456eb37260926

2
common/status_wiregen.h

@ -53,4 +53,4 @@ bool fromwire_status_peer_billboard(const tal_t *ctx, const void *p, bool *perm,
#endif /* LIGHTNING_COMMON_STATUS_WIREGEN_H */
// SHA256STAMP:adfe96ff3b9661f179d937c93c5457c38f20d1caeaaa646326ca0c6d5496a35c
// SHA256STAMP:9d44fada024f78edb1b187537bbf25a5d2e830cff9c822086aa456eb37260926

2
connectd/connectd_gossipd_wiregen.c

@ -161,4 +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:4af15bf6b2957f298e162dd9b8f3a3d03057a417940827fbfaed5b72853bfe65
// SHA256STAMP:5b1b8cca0deddcf16c20684b4e0088b488447e2cab3116477e0e3832d7c9309c

2
connectd/connectd_gossipd_wiregen.h

@ -54,4 +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:4af15bf6b2957f298e162dd9b8f3a3d03057a417940827fbfaed5b72853bfe65
// SHA256STAMP:5b1b8cca0deddcf16c20684b4e0088b488447e2cab3116477e0e3832d7c9309c

2
connectd/connectd_wiregen.c

@ -406,4 +406,4 @@ bool fromwire_connectd_dev_memleak_reply(const void *p, bool *leak)
*leak = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:85f646a5218fd260c3e73d270ea8f59aa14cb3ca02d7805f23b988625ca4deee
// SHA256STAMP:05735b72da2bcd3e099ca9a3d48dba9b2bf3fd89f7bba8b58042b6ce8b0e8e2e

2
connectd/connectd_wiregen.h

@ -103,4 +103,4 @@ bool fromwire_connectd_dev_memleak_reply(const void *p, bool *leak);
#endif /* LIGHTNING_CONNECTD_CONNECTD_WIREGEN_H */
// SHA256STAMP:85f646a5218fd260c3e73d270ea8f59aa14cb3ca02d7805f23b988625ca4deee
// SHA256STAMP:05735b72da2bcd3e099ca9a3d48dba9b2bf3fd89f7bba8b58042b6ce8b0e8e2e

5
devtools/blindedpath.c

@ -147,11 +147,12 @@ int main(int argc, char **argv)
u8 *p;
u8 buf[BIGSIZE_MAX_LEN];
const unsigned char npub[crypto_aead_chacha20poly1305_ietf_NPUBBYTES] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
struct tlv_onionmsg_payload *inner, *outer;
struct tlv_onionmsg_payload *outer;
struct tlv_encmsg_tlvs *inner;
int ret;
/* Inner is encrypted */
inner = tlv_onionmsg_payload_new(tmpctx);
inner = tlv_encmsg_tlvs_new(tmpctx);
/* Use scid if they provided one */
if (scids[i]) {
inner->next_short_channel_id

2
gossipd/gossip_store_wiregen.c

@ -187,4 +187,4 @@ bool fromwire_gossipd_local_add_channel_obs(const tal_t *ctx, const void *p, str
fromwire_u8_array(&cursor, &plen, *features, flen);
return cursor != NULL;
}
// SHA256STAMP:41597b4d43114d650fc300cd4df2c4f7f993a09d9ff427f3f6c0c7248a4b47cd
// SHA256STAMP:c366132d32c26c52e94d122eb16df0b04f9a28bc8eaa437d11565da35ebdbc09

2
gossipd/gossip_store_wiregen.h

@ -58,4 +58,4 @@ bool fromwire_gossipd_local_add_channel_obs(const tal_t *ctx, const void *p, str
#endif /* LIGHTNING_GOSSIPD_GOSSIP_STORE_WIREGEN_H */
// SHA256STAMP:41597b4d43114d650fc300cd4df2c4f7f993a09d9ff427f3f6c0c7248a4b47cd
// SHA256STAMP:c366132d32c26c52e94d122eb16df0b04f9a28bc8eaa437d11565da35ebdbc09

2
gossipd/gossipd_peerd_wiregen.c

@ -187,4 +187,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:c4575b41c403e4760d2a8674edfa45476e15fd8945be672b0e4c120d330e96aa
// SHA256STAMP:aa566d781788b1f286ed3e1a2f370aeeea3a20c2ef407e4f2260363b1b4e343e

2
gossipd/gossipd_peerd_wiregen.h

@ -64,4 +64,4 @@ bool fromwire_gossipd_local_channel_announcement(const tal_t *ctx, const void *p
#endif /* LIGHTNING_GOSSIPD_GOSSIPD_PEERD_WIREGEN_H */
// SHA256STAMP:c4575b41c403e4760d2a8674edfa45476e15fd8945be672b0e4c120d330e96aa
// SHA256STAMP:aa566d781788b1f286ed3e1a2f370aeeea3a20c2ef407e4f2260363b1b4e343e

2
gossipd/gossipd_wiregen.c

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

2
gossipd/gossipd_wiregen.h

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

2
hsmd/hsmd_wiregen.c

@ -1214,4 +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:9b185bdbec96768d072ab4f9aef455ff824ae1df85a4f036eb3e1dfe25a53482
// SHA256STAMP:29a74e9db2d286909d13567701c2f6da7e3565d84cc8793f6c06c428f4fb1172

2
hsmd/hsmd_wiregen.h

@ -271,4 +271,4 @@ bool fromwire_hsmd_get_output_scriptpubkey_reply(const tal_t *ctx, const void *p
#endif /* LIGHTNING_HSMD_HSMD_WIREGEN_H */
// SHA256STAMP:9b185bdbec96768d072ab4f9aef455ff824ae1df85a4f036eb3e1dfe25a53482
// SHA256STAMP:29a74e9db2d286909d13567701c2f6da7e3565d84cc8793f6c06c428f4fb1172

2
onchaind/onchaind_wiregen.c

@ -635,4 +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:a7b7a9a01030d1a19fab69045268b63234ae9efb5129ec9282fb354015886759
// SHA256STAMP:b839f62e9b25740472792b8876eabb51f0b8761c3ab175f163e445579dc87d38

2
onchaind/onchaind_wiregen.h

@ -161,4 +161,4 @@ bool fromwire_onchaind_notify_coin_mvt(const void *p, struct chain_coin_mvt *mvt
#endif /* LIGHTNING_ONCHAIND_ONCHAIND_WIREGEN_H */
// SHA256STAMP:a7b7a9a01030d1a19fab69045268b63234ae9efb5129ec9282fb354015886759
// SHA256STAMP:b839f62e9b25740472792b8876eabb51f0b8761c3ab175f163e445579dc87d38

2
openingd/dualopend_wiregen.c

@ -485,4 +485,4 @@ bool fromwire_dualopend_dev_memleak_reply(const void *p, bool *leak)
*leak = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:c00536896059d3bd16cd8e1512674abcda83fd680e171dfc016a796f7b4be522
// SHA256STAMP:880d3ebf21b58a7c545945c97269534c55cafe5583a21e3b6d6a441be01edd86

2
openingd/dualopend_wiregen.h

@ -109,4 +109,4 @@ bool fromwire_dualopend_dev_memleak_reply(const void *p, bool *leak);
#endif /* LIGHTNING_OPENINGD_DUALOPEND_WIREGEN_H */
// SHA256STAMP:c00536896059d3bd16cd8e1512674abcda83fd680e171dfc016a796f7b4be522
// SHA256STAMP:880d3ebf21b58a7c545945c97269534c55cafe5583a21e3b6d6a441be01edd86

2
openingd/openingd_wiregen.c

@ -579,4 +579,4 @@ bool fromwire_openingd_dev_memleak_reply(const void *p, bool *leak)
*leak = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:99ae0c1ae30e7a4f4d6a890665a6dafbb3f3900ab9f2a99a01a734fa968b2edf
// SHA256STAMP:1b4570bed9532371073012f9035708a41aab2d4db70e405561c0182e98a364d8

2
openingd/openingd_wiregen.h

@ -121,4 +121,4 @@ bool fromwire_openingd_dev_memleak_reply(const void *p, bool *leak);
#endif /* LIGHTNING_OPENINGD_OPENINGD_WIREGEN_H */
// SHA256STAMP:99ae0c1ae30e7a4f4d6a890665a6dafbb3f3900ab9f2a99a01a734fa968b2edf
// SHA256STAMP:1b4570bed9532371073012f9035708a41aab2d4db70e405561c0182e98a364d8

2
tools/gen/header_template

@ -104,7 +104,7 @@ bool fromwire_${tlv.name}(const u8 **cursor, size_t *max,
* ensures that the resulting stream is valid according to
* `${tlv.name}_is_valid`.
*/
void towire_${tlv.name}(u8 **pptr, const void *record);
void towire_${tlv.name}(u8 **pptr, const struct ${tlv.struct_name()} *record);
/**
* Check that the TLV stream is valid.

3
tools/gen/impl_template

@ -257,8 +257,7 @@ ${static}const struct tlv_record_type tlvs_${tlv.name}[] = {
% endfor
};
void towire_${tlv.name}(u8 **pptr,
const void *record)
void towire_${tlv.name}(u8 **pptr, const struct ${tlv.struct_name()} *record)
{
size_t num_types = ${len(tlv.messages)};
const struct tlv_record_type *types = tlvs_${tlv.name};

2
wire/common_wiregen.c

@ -100,4 +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:c8a40362138ff8fcffde2285cda2c85cdfbf66a19591d4bd61066dbe21eda68c
// SHA256STAMP:fe62497ee0bd7740759a6486bfa924b7ababe84fc52a1bb73f4b447549f47613

2
wire/common_wiregen.h

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

2
wire/onion_printgen.c

@ -653,4 +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:6f34c3287d2f8abec14ecd33fe8340b82298a34959e96a752f8dafc0762b8f65
// SHA256STAMP:9e9fd8224814641537178262b21b7ea3c898d5d9282066228938f69236a9df2c

2
wire/onion_printgen.h

@ -57,4 +57,4 @@ void printwire_mpp_timeout(const char *fieldname, const u8 *cursor);
#endif /* LIGHTNING_WIRE_ONION_PRINTGEN_H */
// SHA256STAMP:6f34c3287d2f8abec14ecd33fe8340b82298a34959e96a752f8dafc0762b8f65
// SHA256STAMP:9e9fd8224814641537178262b21b7ea3c898d5d9282066228938f69236a9df2c

5
wire/onion_wiregen.c

@ -194,8 +194,7 @@ const struct tlv_record_type tlvs_tlv_payload[] = {
{ 8, towire_tlv_tlv_payload_payment_data, fromwire_tlv_tlv_payload_payment_data },
};
void towire_tlv_payload(u8 **pptr,
const void *record)
void towire_tlv_payload(u8 **pptr, const struct tlv_tlv_payload *record)
{
size_t num_types = 4;
const struct tlv_record_type *types = tlvs_tlv_payload;
@ -837,4 +836,4 @@ bool fromwire_mpp_timeout(const void *p)
return false;
return cursor != NULL;
}
// SHA256STAMP:6f34c3287d2f8abec14ecd33fe8340b82298a34959e96a752f8dafc0762b8f65
// SHA256STAMP:9e9fd8224814641537178262b21b7ea3c898d5d9282066228938f69236a9df2c

4
wire/onion_wiregen.h

@ -88,7 +88,7 @@ bool fromwire_tlv_payload(const u8 **cursor, size_t *max,
* ensures that the resulting stream is valid according to
* `tlv_payload_is_valid`.
*/
void towire_tlv_payload(u8 **pptr, const void *record);
void towire_tlv_payload(u8 **pptr, const struct tlv_tlv_payload *record);
/**
* Check that the TLV stream is valid.
@ -207,4 +207,4 @@ bool fromwire_mpp_timeout(const void *p);
#endif /* LIGHTNING_WIRE_ONION_WIREGEN_H */
// SHA256STAMP:6f34c3287d2f8abec14ecd33fe8340b82298a34959e96a752f8dafc0762b8f65
// SHA256STAMP:9e9fd8224814641537178262b21b7ea3c898d5d9282066228938f69236a9df2c

2
wire/peer_printgen.c

@ -2036,4 +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:cb418f8296955fdcd26b9f06259a0c120007b543bc167f486989ac289a48c4af
// SHA256STAMP:c38a17eb3c7f3c12612754d5419f2ed44c0114be7252eece347fcb2902aaf9f4

2
wire/peer_printgen.h

@ -70,4 +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:cb418f8296955fdcd26b9f06259a0c120007b543bc167f486989ac289a48c4af
// SHA256STAMP:c38a17eb3c7f3c12612754d5419f2ed44c0114be7252eece347fcb2902aaf9f4

26
wire/peer_wiregen.c

@ -164,8 +164,7 @@ static const struct tlv_record_type tlvs_init_tlvs[] = {
{ 1, towire_tlv_init_tlvs_networks, fromwire_tlv_init_tlvs_networks },
};
void towire_init_tlvs(u8 **pptr,
const void *record)
void towire_init_tlvs(u8 **pptr, const struct tlv_init_tlvs *record)
{
size_t num_types = 1;
const struct tlv_record_type *types = tlvs_init_tlvs;
@ -436,8 +435,7 @@ const struct tlv_record_type tlvs_n1[] = {
{ 254, towire_tlv_n1_tlv4, fromwire_tlv_n1_tlv4 },
};
void towire_n1(u8 **pptr,
const void *record)
void towire_n1(u8 **pptr, const struct tlv_n1 *record)
{
size_t num_types = 4;
const struct tlv_record_type *types = tlvs_n1;
@ -655,8 +653,7 @@ const struct tlv_record_type tlvs_n2[] = {
{ 11, towire_tlv_n2_tlv2, fromwire_tlv_n2_tlv2 },
};
void towire_n2(u8 **pptr,
const void *record)
void towire_n2(u8 **pptr, const struct tlv_n2 *record)
{
size_t num_types = 2;
const struct tlv_record_type *types = tlvs_n2;
@ -849,8 +846,7 @@ static const struct tlv_record_type tlvs_open_channel_tlvs[] = {
{ 0, towire_tlv_open_channel_tlvs_upfront_shutdown_script, fromwire_tlv_open_channel_tlvs_upfront_shutdown_script },
};
void towire_open_channel_tlvs(u8 **pptr,
const void *record)
void towire_open_channel_tlvs(u8 **pptr, const struct tlv_open_channel_tlvs *record)
{
size_t num_types = 1;
const struct tlv_record_type *types = tlvs_open_channel_tlvs;
@ -1043,8 +1039,7 @@ static const struct tlv_record_type tlvs_accept_channel_tlvs[] = {
{ 0, towire_tlv_accept_channel_tlvs_upfront_shutdown_script, fromwire_tlv_accept_channel_tlvs_upfront_shutdown_script },
};
void towire_accept_channel_tlvs(u8 **pptr,
const void *record)
void towire_accept_channel_tlvs(u8 **pptr, const struct tlv_accept_channel_tlvs *record)
{
size_t num_types = 1;
const struct tlv_record_type *types = tlvs_accept_channel_tlvs;
@ -1241,8 +1236,7 @@ static const struct tlv_record_type tlvs_query_short_channel_ids_tlvs[] = {
{ 1, towire_tlv_query_short_channel_ids_tlvs_query_flags, fromwire_tlv_query_short_channel_ids_tlvs_query_flags },
};
void towire_query_short_channel_ids_tlvs(u8 **pptr,
const void *record)
void towire_query_short_channel_ids_tlvs(u8 **pptr, const struct tlv_query_short_channel_ids_tlvs *record)
{
size_t num_types = 1;
const struct tlv_record_type *types = tlvs_query_short_channel_ids_tlvs;
@ -1436,8 +1430,7 @@ static const struct tlv_record_type tlvs_query_channel_range_tlvs[] = {
{ 1, towire_tlv_query_channel_range_tlvs_query_option, fromwire_tlv_query_channel_range_tlvs_query_option },
};
void towire_query_channel_range_tlvs(u8 **pptr,
const void *record)
void towire_query_channel_range_tlvs(u8 **pptr, const struct tlv_query_channel_range_tlvs *record)
{
size_t num_types = 1;
const struct tlv_record_type *types = tlvs_query_channel_range_tlvs;
@ -1662,8 +1655,7 @@ static const struct tlv_record_type tlvs_reply_channel_range_tlvs[] = {
{ 3, towire_tlv_reply_channel_range_tlvs_checksums_tlv, fromwire_tlv_reply_channel_range_tlvs_checksums_tlv },
};
void towire_reply_channel_range_tlvs(u8 **pptr,
const void *record)
void towire_reply_channel_range_tlvs(u8 **pptr, const struct tlv_reply_channel_range_tlvs *record)
{
size_t num_types = 2;
const struct tlv_record_type *types = tlvs_reply_channel_range_tlvs;
@ -2750,4 +2742,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:cb418f8296955fdcd26b9f06259a0c120007b543bc167f486989ac289a48c4af
// SHA256STAMP:c38a17eb3c7f3c12612754d5419f2ed44c0114be7252eece347fcb2902aaf9f4

18
wire/peer_wiregen.h

@ -170,7 +170,7 @@ bool fromwire_init_tlvs(const u8 **cursor, size_t *max,
* ensures that the resulting stream is valid according to
* `init_tlvs_is_valid`.
*/
void towire_init_tlvs(u8 **pptr, const void *record);
void towire_init_tlvs(u8 **pptr, const struct tlv_init_tlvs *record);
/**
* Check that the TLV stream is valid.
@ -207,7 +207,7 @@ bool fromwire_n1(const u8 **cursor, size_t *max,
* ensures that the resulting stream is valid according to
* `n1_is_valid`.
*/
void towire_n1(u8 **pptr, const void *record);
void towire_n1(u8 **pptr, const struct tlv_n1 *record);
/**
* Check that the TLV stream is valid.
@ -257,7 +257,7 @@ bool fromwire_n2(const u8 **cursor, size_t *max,
* ensures that the resulting stream is valid according to
* `n2_is_valid`.
*/
void towire_n2(u8 **pptr, const void *record);
void towire_n2(u8 **pptr, const struct tlv_n2 *record);
/**
* Check that the TLV stream is valid.
@ -305,7 +305,7 @@ bool fromwire_open_channel_tlvs(const u8 **cursor, size_t *max,
* ensures that the resulting stream is valid according to
* `open_channel_tlvs_is_valid`.
*/
void towire_open_channel_tlvs(u8 **pptr, const void *record);
void towire_open_channel_tlvs(u8 **pptr, const struct tlv_open_channel_tlvs *record);
/**
* Check that the TLV stream is valid.
@ -342,7 +342,7 @@ bool fromwire_accept_channel_tlvs(const u8 **cursor, size_t *max,
* ensures that the resulting stream is valid according to
* `accept_channel_tlvs_is_valid`.
*/
void towire_accept_channel_tlvs(u8 **pptr, const void *record);
void towire_accept_channel_tlvs(u8 **pptr, const struct tlv_accept_channel_tlvs *record);
/**
* Check that the TLV stream is valid.
@ -379,7 +379,7 @@ bool fromwire_query_short_channel_ids_tlvs(const u8 **cursor, size_t *max,
* ensures that the resulting stream is valid according to
* `query_short_channel_ids_tlvs_is_valid`.
*/
void towire_query_short_channel_ids_tlvs(u8 **pptr, const void *record);
void towire_query_short_channel_ids_tlvs(u8 **pptr, const struct tlv_query_short_channel_ids_tlvs *record);
/**
* Check that the TLV stream is valid.
@ -416,7 +416,7 @@ bool fromwire_query_channel_range_tlvs(const u8 **cursor, size_t *max,
* ensures that the resulting stream is valid according to
* `query_channel_range_tlvs_is_valid`.
*/
void towire_query_channel_range_tlvs(u8 **pptr, const void *record);
void towire_query_channel_range_tlvs(u8 **pptr, const struct tlv_query_channel_range_tlvs *record);
/**
* Check that the TLV stream is valid.
@ -453,7 +453,7 @@ bool fromwire_reply_channel_range_tlvs(const u8 **cursor, size_t *max,
* ensures that the resulting stream is valid according to
* `reply_channel_range_tlvs_is_valid`.
*/
void towire_reply_channel_range_tlvs(u8 **pptr, const void *record);
void towire_reply_channel_range_tlvs(u8 **pptr, const struct tlv_reply_channel_range_tlvs *record);
/**
* Check that the TLV stream is valid.
@ -595,4 +595,4 @@ bool fromwire_channel_update_option_channel_htlc_max(const void *p, secp256k1_ec
#endif /* LIGHTNING_WIRE_PEER_WIREGEN_H */
// SHA256STAMP:cb418f8296955fdcd26b9f06259a0c120007b543bc167f486989ac289a48c4af
// SHA256STAMP:c38a17eb3c7f3c12612754d5419f2ed44c0114be7252eece347fcb2902aaf9f4

Loading…
Cancel
Save