wire: Fix generated files

Changelog-None
This commit is contained in:
Jan Sarenik 2021-09-19 12:57:02 +02:00 committed by Christian Decker
parent 284ad2bade
commit 3f05dff89d
17 changed files with 129 additions and 12 deletions

View File

@ -155,6 +155,7 @@ clean: wire-clean
wire-clean:
$(RM) wire/*.csv.*
$(RM) wire/channel_type_*gen*
wire-maintainer-clean: wire-clean
$(RM) wire/gen_*_csv wire/extracted_*_experimental_csv

2
wire/bolt12_wiregen.c generated
View File

@ -1684,4 +1684,4 @@ bool invoice_error_is_valid(const struct tlv_invoice_error *record, size_t *err_
return tlv_fields_valid(record->fields, NULL, err_index);
}
// SHA256STAMP:a2c41aa239904c7cbfe50e576e6724eedb50fff1e1014ac80912aa195ed8e912
// SHA256STAMP:040e24ba1c955e65d81d184dac635c72fe8af10aa1795411d6ec2e7ed76c6224

2
wire/bolt12_wiregen.h generated
View File

@ -323,4 +323,4 @@ struct fallback_address *fromwire_fallback_address(const tal_t *ctx, const u8 **
#endif /* LIGHTNING_WIRE_BOLT12_WIREGEN_H */
// SHA256STAMP:a2c41aa239904c7cbfe50e576e6724eedb50fff1e1014ac80912aa195ed8e912
// SHA256STAMP:040e24ba1c955e65d81d184dac635c72fe8af10aa1795411d6ec2e7ed76c6224

32
wire/channel_type_printgen.c generated Normal file
View File

@ -0,0 +1,32 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the .csv file it was generated from. */
#include <wire/channel_type_printgen.h>
#include <ccan/array_size/array_size.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <inttypes.h>
#include <stdio.h>
void printwire_channel_type(const char *fieldname, const u8 **cursor, size_t *plen)
{
u16 len = fromwire_u16(cursor, plen);
if (!*cursor) {
printf("**TRUNCATED**\n");
return;
}
printf("features=");
printwire_u8_array(tal_fmt(NULL, "%s.features", fieldname), cursor, plen, len);
if (!*cursor) {
printf("**TRUNCATED**\n");
return;
}
}
// SHA256STAMP:8639d78101a54a07ac8be72bc33df8d2c974b52452786fb5a898f0a83a7837a7

16
wire/channel_type_printgen.h generated Normal file
View File

@ -0,0 +1,16 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the .csv file it was generated from. */
/* Template located at tools/gen/print_header_template */
#ifndef LIGHTNING_WIRE_CHANNEL_TYPE_PRINTGEN_H
#define LIGHTNING_WIRE_CHANNEL_TYPE_PRINTGEN_H
#include <ccan/tal/tal.h>
#include <devtools/print_wire.h>
void printchannel_type_wire_message(const u8 *msg);
void printchannel_type_wire_tlv_message(const char *tlv_name, const u8 *msg);
void printwire_channel_type(const char *fieldname, const u8 **cursor, size_t *plen);
#endif /* LIGHTNING_WIRE_CHANNEL_TYPE_PRINTGEN_H */
// SHA256STAMP:8639d78101a54a07ac8be72bc33df8d2c974b52452786fb5a898f0a83a7837a7

42
wire/channel_type_wiregen.c generated Normal file
View File

@ -0,0 +1,42 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the .csv file it was generated from. */
/* Original template can be found at tools/gen/impl_template */
#include <wire/channel_type_wiregen.h>
#include <assert.h>
#include <ccan/array_size/array_size.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <stdio.h>
#ifndef SUPERVERBOSE
#define SUPERVERBOSE(...)
#endif
/* SUBTYPE: CHANNEL_TYPE */
/* Why not let our generator generate this too? */
void towire_channel_type(u8 **p, const struct channel_type *channel_type)
{
u16 len = tal_count(channel_type->features);
towire_u16(p, len);
towire_u8_array(p, channel_type->features, len);
}
struct channel_type *
fromwire_channel_type(const tal_t *ctx, const u8 **cursor, size_t *plen)
{
struct channel_type *channel_type = tal(ctx, struct channel_type);
u16 len;
len = fromwire_u16(cursor, plen);
channel_type->features = tal_arr(channel_type, u8, len);
fromwire_u8_array(cursor, plen, channel_type->features, len);
return channel_type;
}
// SHA256STAMP:8639d78101a54a07ac8be72bc33df8d2c974b52452786fb5a898f0a83a7837a7

23
wire/channel_type_wiregen.h generated Normal file
View File

@ -0,0 +1,23 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Original template can be found at tools/gen/header_template */
#ifndef LIGHTNING_WIRE_CHANNEL_TYPE_WIREGEN_H
#define LIGHTNING_WIRE_CHANNEL_TYPE_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
struct channel_type {
u8 *features;
};
/* SUBTYPE: CHANNEL_TYPE */
/* Why not let our generator generate this too? */
void towire_channel_type(u8 **p, const struct channel_type *channel_type);
struct channel_type *fromwire_channel_type(const tal_t *ctx, const u8 **cursor, size_t *plen);
#endif /* LIGHTNING_WIRE_CHANNEL_TYPE_WIREGEN_H */
// SHA256STAMP:8639d78101a54a07ac8be72bc33df8d2c974b52452786fb5a898f0a83a7837a7

2
wire/common_wiregen.c generated
View File

@ -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:c605fef4b00d9d261397e1e1decd2b59ee06e64cec4fc0d175c56aa598e0fc31
// SHA256STAMP:a0d8998b1f9bd46677f237471545a49b8009e41b8b3afedf0007adeabf98b440

2
wire/common_wiregen.h generated
View File

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

2
wire/onion_printgen.c generated
View File

@ -859,4 +859,4 @@ void printonion_wire_tlv_message(const char *tlv_name, const u8 *msg) {
printwire_tlvs(tlv_name, &msg, &plen, print_tlvs_encmsg_tlvs, ARRAY_SIZE(print_tlvs_encmsg_tlvs));
}
}
// SHA256STAMP:1425ef44095bc90c4b405497ade727e41d6cde27c1f6e64c8d7239036410dd30
// SHA256STAMP:5ef4b9da2deee24db844109a2b461c65ad3dbc262da673a304d15082484398e0

4
wire/onion_printgen.h generated
View File

@ -3,7 +3,9 @@
/* Template located at tools/gen/print_header_template */
#ifndef LIGHTNING_WIRE_ONION_PRINTGEN_H
#define LIGHTNING_WIRE_ONION_PRINTGEN_H
#include <ccan/tal/tal.h>
#include <devtools/print_wire.h>
#include <wire/onion_defs.h>
void printonion_wire_message(const u8 *msg);
@ -56,4 +58,4 @@ void printwire_mpp_timeout(const char *fieldname, const u8 *cursor);
void printwire_onionmsg_path(const char *fieldname, const u8 **cursor, size_t *plen);
#endif /* LIGHTNING_WIRE_ONION_PRINTGEN_H */
// SHA256STAMP:1425ef44095bc90c4b405497ade727e41d6cde27c1f6e64c8d7239036410dd30
// SHA256STAMP:5ef4b9da2deee24db844109a2b461c65ad3dbc262da673a304d15082484398e0

2
wire/onion_wiregen.c generated
View File

@ -1026,4 +1026,4 @@ bool fromwire_mpp_timeout(const void *p)
return false;
return cursor != NULL;
}
// SHA256STAMP:1425ef44095bc90c4b405497ade727e41d6cde27c1f6e64c8d7239036410dd30
// SHA256STAMP:5ef4b9da2deee24db844109a2b461c65ad3dbc262da673a304d15082484398e0

2
wire/onion_wiregen.h generated
View File

@ -317,4 +317,4 @@ bool fromwire_mpp_timeout(const void *p);
#endif /* LIGHTNING_WIRE_ONION_WIREGEN_H */
// SHA256STAMP:1425ef44095bc90c4b405497ade727e41d6cde27c1f6e64c8d7239036410dd30
// SHA256STAMP:5ef4b9da2deee24db844109a2b461c65ad3dbc262da673a304d15082484398e0

2
wire/peer_printgen.c generated
View File

@ -3139,4 +3139,4 @@ void printpeer_wire_tlv_message(const char *tlv_name, const u8 *msg) {
printwire_tlvs(tlv_name, &msg, &plen, print_tlvs_onion_message_tlvs, ARRAY_SIZE(print_tlvs_onion_message_tlvs));
}
}
// SHA256STAMP:80b32650a8208ef15d83ebecbb3bae3c321fdc8594802de10847ae95f2169952
// SHA256STAMP:30dc0f24cedd3001a2f330446f89575d68b80a2f0c33563bf07093b7bf4196b3

3
wire/peer_printgen.h generated
View File

@ -3,6 +3,7 @@
/* Template located at tools/gen/print_header_template */
#ifndef LIGHTNING_WIRE_PEER_PRINTGEN_H
#define LIGHTNING_WIRE_PEER_PRINTGEN_H
#include <ccan/tal/tal.h>
#include <devtools/print_wire.h>
void printpeer_wire_message(const u8 *msg);
@ -98,4 +99,4 @@ void printwire_channel_update_checksums(const char *fieldname, const u8 **cursor
void printwire_channel_update_timestamps(const char *fieldname, const u8 **cursor, size_t *plen);
void printwire_witness_stack(const char *fieldname, const u8 **cursor, size_t *plen);
#endif /* LIGHTNING_WIRE_PEER_PRINTGEN_H */
// SHA256STAMP:80b32650a8208ef15d83ebecbb3bae3c321fdc8594802de10847ae95f2169952
// SHA256STAMP:30dc0f24cedd3001a2f330446f89575d68b80a2f0c33563bf07093b7bf4196b3

2
wire/peer_wiregen.c generated
View File

@ -2589,4 +2589,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:80b32650a8208ef15d83ebecbb3bae3c321fdc8594802de10847ae95f2169952
// SHA256STAMP:30dc0f24cedd3001a2f330446f89575d68b80a2f0c33563bf07093b7bf4196b3

2
wire/peer_wiregen.h generated
View File

@ -981,4 +981,4 @@ bool fromwire_channel_update_option_channel_htlc_max(const void *p, secp256k1_ec
#endif /* LIGHTNING_WIRE_PEER_WIREGEN_H */
// SHA256STAMP:80b32650a8208ef15d83ebecbb3bae3c321fdc8594802de10847ae95f2169952
// SHA256STAMP:30dc0f24cedd3001a2f330446f89575d68b80a2f0c33563bf07093b7bf4196b3