lightningd: don't turn zero-length tlv fields into NULL.

Fixes: #4667
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-07-21 15:08:29 +09:30 committed by neil saitug
parent d38cfcf33b
commit ceb40dea38
41 changed files with 68 additions and 69 deletions

View File

@ -1181,4 +1181,4 @@ bool fromwire_channeld_blockheight(const void *p, u32 *blockheight)
*blockheight = fromwire_u32(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:977cf1dac7bbca4163cfbbf53f8f448430775368496205ee6f181eb4d8c8c8af
// SHA256STAMP:6f130803e485882bd3fee03f792036434d0a7062e1ba4ec6bc97756460d6b21a

View File

@ -240,4 +240,4 @@ bool fromwire_channeld_blockheight(const void *p, u32 *blockheight);
#endif /* LIGHTNING_CHANNELD_CHANNELD_WIREGEN_H */
// SHA256STAMP:977cf1dac7bbca4163cfbbf53f8f448430775368496205ee6f181eb4d8c8c8af
// SHA256STAMP:6f130803e485882bd3fee03f792036434d0a7062e1ba4ec6bc97756460d6b21a

View File

@ -195,4 +195,4 @@ bool fromwire_closingd_complete(const void *p)
return false;
return cursor != NULL;
}
// SHA256STAMP:681e83ed1e1950220b1e9dbf168e5583e23120981b9a084eab5bc6ce1bc9a1aa
// SHA256STAMP:961ca5ceef03f911684ba0e7863d69993e692b9b418108e6038a567cb7cc7b3e

View File

@ -56,4 +56,4 @@ bool fromwire_closingd_complete(const void *p);
#endif /* LIGHTNING_CLOSINGD_CLOSINGD_WIREGEN_H */
// SHA256STAMP:681e83ed1e1950220b1e9dbf168e5583e23120981b9a084eab5bc6ce1bc9a1aa
// SHA256STAMP:961ca5ceef03f911684ba0e7863d69993e692b9b418108e6038a567cb7cc7b3e

View File

@ -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:db80a04b587e0918ef55f7e82519f7ff86620c5ec4fd845452214059c1cdbd41
// SHA256STAMP:4606ed7d72f93f4fe260080b8b6810ef1b0efa60e96d22b987a6bd16213e365f

View File

@ -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:db80a04b587e0918ef55f7e82519f7ff86620c5ec4fd845452214059c1cdbd41
// SHA256STAMP:4606ed7d72f93f4fe260080b8b6810ef1b0efa60e96d22b987a6bd16213e365f

View File

@ -214,4 +214,4 @@ bool fromwire_status_version(const tal_t *ctx, const void *p, wirestring **versi
*version = fromwire_wirestring(ctx, &cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:6f868de7019bd204be0d90618a044c20ec1170430e3196674040ddb7f7278e80
// SHA256STAMP:2649c615ee63c7855d66cd8d9731deb4819dd4e442d59f59d2616ea7be0fed71

View File

@ -58,4 +58,4 @@ bool fromwire_status_version(const tal_t *ctx, const void *p, wirestring **versi
#endif /* LIGHTNING_COMMON_STATUS_WIREGEN_H */
// SHA256STAMP:6f868de7019bd204be0d90618a044c20ec1170430e3196674040ddb7f7278e80
// SHA256STAMP:2649c615ee63c7855d66cd8d9731deb4819dd4e442d59f59d2616ea7be0fed71

View File

@ -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:a115dcd604f1bcbe48bf57b25bfc2b59ec7eff3c4790812fa1c460aee2b50811
// SHA256STAMP:f046184497c8415e2e1337f2b82412bc0094c9c7935e5a3312560331ca6c9f32

View File

@ -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:a115dcd604f1bcbe48bf57b25bfc2b59ec7eff3c4790812fa1c460aee2b50811
// SHA256STAMP:f046184497c8415e2e1337f2b82412bc0094c9c7935e5a3312560331ca6c9f32

View File

@ -443,4 +443,4 @@ bool fromwire_connectd_dev_memleak_reply(const void *p, bool *leak)
*leak = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:27a03f6c7a77a83be6fc4d063fd37d4bc47e7280310f19d72859ff3f409e05ca
// SHA256STAMP:685593d3211a88f48474420db7f114a48d0619ee00eb7ec337fe8d78deecf426

View File

@ -110,4 +110,4 @@ bool fromwire_connectd_dev_memleak_reply(const void *p, bool *leak);
#endif /* LIGHTNING_CONNECTD_CONNECTD_WIREGEN_H */
// SHA256STAMP:27a03f6c7a77a83be6fc4d063fd37d4bc47e7280310f19d72859ff3f409e05ca
// SHA256STAMP:685593d3211a88f48474420db7f114a48d0619ee00eb7ec337fe8d78deecf426

View File

@ -159,4 +159,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:bd1bae6f6b56d4efa95e17b7aff042b897acacdd783cef7df0dd729f6c9b5d8f
\" SHA256STAMP:e6b321a49c0613e9812343cdc252850930569e63e19291afbcbf6a4a135d2552

View File

@ -210,4 +210,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:a709d2e8f179fb393064e210e72f1118fd60f67134d5f94fe33dc58a62f38ff7
// SHA256STAMP:9bf21787d4ea17d2ae119c2120fd14d025824ab239b12855720addae5a919b2b

View File

@ -63,4 +63,4 @@ bool fromwire_gossipd_local_add_channel_obs(const tal_t *ctx, const void *p, str
#endif /* LIGHTNING_GOSSIPD_GOSSIP_STORE_WIREGEN_H */
// SHA256STAMP:a709d2e8f179fb393064e210e72f1118fd60f67134d5f94fe33dc58a62f38ff7
// SHA256STAMP:9bf21787d4ea17d2ae119c2120fd14d025824ab239b12855720addae5a919b2b

View File

@ -161,4 +161,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:3b60c444839f3c615c80609a295f43fd95f1bd6e9b4a66e56c95cf0e4e7607b1
// SHA256STAMP:d90ca8e3167dc1e0d140bedca5963b94de835eaae18aba97c99e79f500c068d1

View File

@ -57,4 +57,4 @@ bool fromwire_gossipd_local_channel_announcement(const tal_t *ctx, const void *p
#endif /* LIGHTNING_GOSSIPD_GOSSIPD_PEERD_WIREGEN_H */
// SHA256STAMP:3b60c444839f3c615c80609a295f43fd95f1bd6e9b4a66e56c95cf0e4e7607b1
// SHA256STAMP:d90ca8e3167dc1e0d140bedca5963b94de835eaae18aba97c99e79f500c068d1

View File

@ -777,4 +777,4 @@ bool fromwire_gossipd_new_lease_rates(const void *p, struct lease_rates *rates)
fromwire_lease_rates(&cursor, &plen, rates);
return cursor != NULL;
}
// SHA256STAMP:a0408d2e1f668c085378bc2729e08d8712a95edc48d12df8c6cbf063aeddbf32
// SHA256STAMP:6252e4a2529ea03470fbb950ebe3d616c6a8ffedf199ff3091608f2d9f18efcf

View File

@ -188,4 +188,4 @@ bool fromwire_gossipd_new_lease_rates(const void *p, struct lease_rates *rates);
#endif /* LIGHTNING_GOSSIPD_GOSSIPD_WIREGEN_H */
// SHA256STAMP:a0408d2e1f668c085378bc2729e08d8712a95edc48d12df8c6cbf063aeddbf32
// SHA256STAMP:6252e4a2529ea03470fbb950ebe3d616c6a8ffedf199ff3091608f2d9f18efcf

View File

@ -1331,4 +1331,4 @@ bool fromwire_hsmd_sign_option_will_fund_offer_reply(const void *p, secp256k1_ec
fromwire_secp256k1_ecdsa_signature(&cursor, &plen, rsig);
return cursor != NULL;
}
// SHA256STAMP:5cc29ba49eb086d023342733bcaeb16b5b8e3c5b7b9d5826e70dd4f46b0d1dd2
// SHA256STAMP:ca4451abdbde0ac4c8a542e9ba48d2075fb7fcd12a30be739371966dcd8b3d9e

View File

@ -295,4 +295,4 @@ bool fromwire_hsmd_sign_option_will_fund_offer_reply(const void *p, secp256k1_ec
#endif /* LIGHTNING_HSMD_HSMD_WIREGEN_H */
// SHA256STAMP:5cc29ba49eb086d023342733bcaeb16b5b8e3c5b7b9d5826e70dd4f46b0d1dd2
// SHA256STAMP:ca4451abdbde0ac4c8a542e9ba48d2075fb7fcd12a30be739371966dcd8b3d9e

View File

@ -639,4 +639,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:5aa638efffb78c0f1cac4889fb37e3666792ad716f7db66c925b4640628ffbde
// SHA256STAMP:f226dc95c62a951ec3fa958313783f65daff69034a06ef4188b81ca80fe7b53a

View File

@ -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:5aa638efffb78c0f1cac4889fb37e3666792ad716f7db66c925b4640628ffbde
// SHA256STAMP:f226dc95c62a951ec3fa958313783f65daff69034a06ef4188b81ca80fe7b53a

View File

@ -1096,4 +1096,4 @@ bool fromwire_dualopend_validate_lease_reply(const tal_t *ctx, const void *p, wi
}
return cursor != NULL;
}
// SHA256STAMP:893f2d8e99ee42b814c293ee5fc24c6234b4198c87eaa9ec55e83c8085b5045f
// SHA256STAMP:323fc0085091d47b8f1f66ee5455fd229fdb4a29fc43711ac81cc5fe9eb9b696

View File

@ -237,4 +237,4 @@ bool fromwire_dualopend_validate_lease_reply(const tal_t *ctx, const void *p, wi
#endif /* LIGHTNING_OPENINGD_DUALOPEND_WIREGEN_H */
// SHA256STAMP:893f2d8e99ee42b814c293ee5fc24c6234b4198c87eaa9ec55e83c8085b5045f
// SHA256STAMP:323fc0085091d47b8f1f66ee5455fd229fdb4a29fc43711ac81cc5fe9eb9b696

View File

@ -604,4 +604,4 @@ bool fromwire_openingd_dev_memleak_reply(const void *p, bool *leak)
*leak = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:779aa98c325bc5c87c31b24767f45f22edd135b8e2be4fe3ca1282d91950f0c4
// SHA256STAMP:e01a9f3e8b3c9962c9b35502d3b74977e289e61ebebf28627276e97d06bc4b35

View File

@ -128,4 +128,4 @@ bool fromwire_openingd_dev_memleak_reply(const void *p, bool *leak);
#endif /* LIGHTNING_OPENINGD_OPENINGD_WIREGEN_H */
// SHA256STAMP:779aa98c325bc5c87c31b24767f45f22edd135b8e2be4fe3ca1282d91950f0c4
// SHA256STAMP:e01a9f3e8b3c9962c9b35502d3b74977e289e61ebebf28627276e97d06bc4b35

View File

@ -3923,7 +3923,6 @@ def test_offer_needs_option(node_factory):
l1.rpc.call('fetchinvoice', {'offer': 'aaaa'})
@pytest.mark.xfail(strict=True)
def test_offer(node_factory, bitcoind):
plugin = os.path.join(os.path.dirname(__file__), 'plugins/currencyUSDAUD5000.py')
l1 = node_factory.get_node(options={'plugin': plugin, 'experimental-offers': None})

View File

@ -79,7 +79,7 @@ towire_${type_obj.name}(${ptr}, ${'' if type_obj.is_assignable() or type_obj.is_
% if f.type_obj.has_array_helper():
## We assume array helpers only deal with things literally transcribed!!
% if f.is_varlen():
${fieldname} = ${f.size('*plen')} ? tal_arr(${ctx}, ${typename}, ${f.size('*plen')}) : NULL;
${fieldname} = tal_arr(${ctx}, ${typename}, ${f.size('*plen')});
% endif
fromwire_${type_}_array(cursor, plen, ${fieldname}, ${f.size('*plen')});
% else:

View File

@ -66,7 +66,7 @@ fromwire_blinded_payinfo(const tal_t *ctx, const u8 **cursor, size_t *plen)
blinded_payinfo->fee_proportional_millionths = fromwire_u32(cursor, plen);
blinded_payinfo->cltv_expiry_delta = fromwire_u16(cursor, plen);
flen = fromwire_u16(cursor, plen);
blinded_payinfo->features = flen ? tal_arr(blinded_payinfo, u8, flen) : NULL;
blinded_payinfo->features = tal_arr(blinded_payinfo, u8, flen);
fromwire_u8_array(cursor, plen, blinded_payinfo->features, flen);
return blinded_payinfo;
@ -89,7 +89,7 @@ fromwire_fallback_address(const tal_t *ctx, const u8 **cursor, size_t *plen)
fallback_address->version = fromwire_u8(cursor, plen);
len = fromwire_u16(cursor, plen);
fallback_address->address = len ? tal_arr(fallback_address, u8, len) : NULL;
fallback_address->address = tal_arr(fallback_address, u8, len);
fromwire_u8_array(cursor, plen, fallback_address->address, len);
return fallback_address;
@ -152,7 +152,7 @@ static void fromwire_tlv_offer_currency(const u8 **cursor, size_t *plen, void *v
{
struct tlv_offer *r = vrecord;
r->currency = *plen ? tal_arr(r, utf8, *plen) : NULL;
r->currency = tal_arr(r, utf8, *plen);
fromwire_utf8_array(cursor, plen, r->currency, *plen);
}
/* OFFER MSG: amount */
@ -197,7 +197,7 @@ static void fromwire_tlv_offer_description(const u8 **cursor, size_t *plen, void
{
struct tlv_offer *r = vrecord;
r->description = *plen ? tal_arr(r, utf8, *plen) : NULL;
r->description = tal_arr(r, utf8, *plen);
fromwire_utf8_array(cursor, plen, r->description, *plen);
}
/* OFFER MSG: features */
@ -219,7 +219,7 @@ static void fromwire_tlv_offer_features(const u8 **cursor, size_t *plen, void *v
{
struct tlv_offer *r = vrecord;
r->features = *plen ? tal_arr(r, u8, *plen) : NULL;
r->features = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->features, *plen);
}
/* OFFER MSG: absolute_expiry */
@ -291,7 +291,7 @@ static void fromwire_tlv_offer_vendor(const u8 **cursor, size_t *plen, void *vre
{
struct tlv_offer *r = vrecord;
r->vendor = *plen ? tal_arr(r, utf8, *plen) : NULL;
r->vendor = tal_arr(r, utf8, *plen);
fromwire_utf8_array(cursor, plen, r->vendor, *plen);
}
/* OFFER MSG: quantity_min */
@ -670,7 +670,7 @@ static void fromwire_tlv_invoice_request_features(const u8 **cursor, size_t *ple
{
struct tlv_invoice_request *r = vrecord;
r->features = *plen ? tal_arr(r, u8, *plen) : NULL;
r->features = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->features, *plen);
}
/* INVOICE_REQUEST MSG: quantity */
@ -784,7 +784,7 @@ static void fromwire_tlv_invoice_request_payer_note(const u8 **cursor, size_t *p
{
struct tlv_invoice_request *r = vrecord;
r->payer_note = *plen ? tal_arr(r, utf8, *plen) : NULL;
r->payer_note = tal_arr(r, utf8, *plen);
fromwire_utf8_array(cursor, plen, r->payer_note, *plen);
}
/* INVOICE_REQUEST MSG: payer_info */
@ -806,7 +806,7 @@ static void fromwire_tlv_invoice_request_payer_info(const u8 **cursor, size_t *p
{
struct tlv_invoice_request *r = vrecord;
r->payer_info = *plen ? tal_arr(r, u8, *plen) : NULL;
r->payer_info = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->payer_info, *plen);
}
/* INVOICE_REQUEST MSG: replace_invoice */
@ -990,7 +990,7 @@ static void fromwire_tlv_invoice_description(const u8 **cursor, size_t *plen, vo
{
struct tlv_invoice *r = vrecord;
r->description = *plen ? tal_arr(r, utf8, *plen) : NULL;
r->description = tal_arr(r, utf8, *plen);
fromwire_utf8_array(cursor, plen, r->description, *plen);
}
/* INVOICE MSG: features */
@ -1012,7 +1012,7 @@ static void fromwire_tlv_invoice_features(const u8 **cursor, size_t *plen, void
{
struct tlv_invoice *r = vrecord;
r->features = *plen ? tal_arr(r, u8, *plen) : NULL;
r->features = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->features, *plen);
}
/* INVOICE MSG: paths */
@ -1115,7 +1115,7 @@ static void fromwire_tlv_invoice_vendor(const u8 **cursor, size_t *plen, void *v
{
struct tlv_invoice *r = vrecord;
r->vendor = *plen ? tal_arr(r, utf8, *plen) : NULL;
r->vendor = tal_arr(r, utf8, *plen);
fromwire_utf8_array(cursor, plen, r->vendor, *plen);
}
/* INVOICE MSG: node_id */
@ -1317,7 +1317,7 @@ static void fromwire_tlv_invoice_payer_note(const u8 **cursor, size_t *plen, voi
{
struct tlv_invoice *r = vrecord;
r->payer_note = *plen ? tal_arr(r, utf8, *plen) : NULL;
r->payer_note = tal_arr(r, utf8, *plen);
fromwire_utf8_array(cursor, plen, r->payer_note, *plen);
}
/* INVOICE MSG: payer_info */
@ -1339,7 +1339,7 @@ static void fromwire_tlv_invoice_payer_info(const u8 **cursor, size_t *plen, voi
{
struct tlv_invoice *r = vrecord;
r->payer_info = *plen ? tal_arr(r, u8, *plen) : NULL;
r->payer_info = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->payer_info, *plen);
}
/* INVOICE MSG: created_at */
@ -1636,7 +1636,7 @@ static void fromwire_tlv_invoice_error_suggested_value(const u8 **cursor, size_t
{
struct tlv_invoice_error *r = vrecord;
r->suggested_value = *plen ? tal_arr(r, u8, *plen) : NULL;
r->suggested_value = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->suggested_value, *plen);
}
/* INVOICE_ERROR MSG: error */
@ -1658,7 +1658,7 @@ static void fromwire_tlv_invoice_error_error(const u8 **cursor, size_t *plen, vo
{
struct tlv_invoice_error *r = vrecord;
r->error = *plen ? tal_arr(r, utf8, *plen) : NULL;
r->error = tal_arr(r, utf8, *plen);
fromwire_utf8_array(cursor, plen, r->error, *plen);
}
@ -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:2946a3a3734bd6af218cb73b4d42ec16fe68c1041b48e084cc160810870bcdd5
// SHA256STAMP:f29bdf0cc1fd0cce9362c88e3b8681781e11c203cc3026fe13e6c52a845154ba

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:2946a3a3734bd6af218cb73b4d42ec16fe68c1041b48e084cc160810870bcdd5
// SHA256STAMP:f29bdf0cc1fd0cce9362c88e3b8681781e11c203cc3026fe13e6c52a845154ba

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:959a0af7e5dc054bc1bd313dee486b3c2040853b8f3772d889e51048e14ac2b5
// SHA256STAMP:5e31b6f1281965e31e28ce8a6d1a7e54635170b877bbd11b6ec09cba60f317aa

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:959a0af7e5dc054bc1bd313dee486b3c2040853b8f3772d889e51048e14ac2b5
// SHA256STAMP:5e31b6f1281965e31e28ce8a6d1a7e54635170b877bbd11b6ec09cba60f317aa

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:fcaea2b057478205299b8935161c994fece0e410e6942503943747625ddcfc8a
// SHA256STAMP:79946dd94a6cd6e0af297d3676c688228c7098e6b874469cd49b63fee97ac8cf

View File

@ -58,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:fcaea2b057478205299b8935161c994fece0e410e6942503943747625ddcfc8a
// SHA256STAMP:79946dd94a6cd6e0af297d3676c688228c7098e6b874469cd49b63fee97ac8cf

View File

@ -98,7 +98,7 @@ fromwire_onionmsg_path(const tal_t *ctx, const u8 **cursor, size_t *plen)
fromwire_pubkey(cursor, plen, &onionmsg_path->node_id);
enclen = fromwire_u16(cursor, plen);
onionmsg_path->enctlv = enclen ? tal_arr(onionmsg_path, u8, enclen) : NULL;
onionmsg_path->enctlv = tal_arr(onionmsg_path, u8, enclen);
fromwire_u8_array(cursor, plen, onionmsg_path->enctlv, enclen);
return onionmsg_path;
@ -340,7 +340,7 @@ static void fromwire_tlv_onionmsg_payload_enctlv(const u8 **cursor, size_t *plen
{
struct tlv_onionmsg_payload *r = vrecord;
r->enctlv = *plen ? tal_arr(r, u8, *plen) : NULL;
r->enctlv = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->enctlv, *plen);
}
/* ONIONMSG_PAYLOAD MSG: blinding */
@ -385,7 +385,7 @@ static void fromwire_tlv_onionmsg_payload_invoice_request(const u8 **cursor, siz
{
struct tlv_onionmsg_payload *r = vrecord;
r->invoice_request = *plen ? tal_arr(r, u8, *plen) : NULL;
r->invoice_request = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->invoice_request, *plen);
}
/* ONIONMSG_PAYLOAD MSG: invoice */
@ -407,7 +407,7 @@ static void fromwire_tlv_onionmsg_payload_invoice(const u8 **cursor, size_t *ple
{
struct tlv_onionmsg_payload *r = vrecord;
r->invoice = *plen ? tal_arr(r, u8, *plen) : NULL;
r->invoice = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->invoice, *plen);
}
/* ONIONMSG_PAYLOAD MSG: invoice_error */
@ -429,7 +429,7 @@ static void fromwire_tlv_onionmsg_payload_invoice_error(const u8 **cursor, size_
{
struct tlv_onionmsg_payload *r = vrecord;
r->invoice_error = *plen ? tal_arr(r, u8, *plen) : NULL;
r->invoice_error = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->invoice_error, *plen);
}
@ -1026,4 +1026,4 @@ bool fromwire_mpp_timeout(const void *p)
return false;
return cursor != NULL;
}
// SHA256STAMP:fcaea2b057478205299b8935161c994fece0e410e6942503943747625ddcfc8a
// SHA256STAMP:79946dd94a6cd6e0af297d3676c688228c7098e6b874469cd49b63fee97ac8cf

View File

@ -317,4 +317,4 @@ bool fromwire_mpp_timeout(const void *p);
#endif /* LIGHTNING_WIRE_ONION_WIREGEN_H */
// SHA256STAMP:fcaea2b057478205299b8935161c994fece0e410e6942503943747625ddcfc8a
// SHA256STAMP:79946dd94a6cd6e0af297d3676c688228c7098e6b874469cd49b63fee97ac8cf

View File

@ -3079,4 +3079,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:7c9612ec7cc62b3a44ae65d19b855b521e96796940b4c3d50977d768ace8712e
// SHA256STAMP:7acdb2f85dec7c26fb60ae3302f387fbccae349e182d05c6e4bb043ce2546797

View File

@ -99,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:7c9612ec7cc62b3a44ae65d19b855b521e96796940b4c3d50977d768ace8712e
// SHA256STAMP:7acdb2f85dec7c26fb60ae3302f387fbccae349e182d05c6e4bb043ce2546797

View File

@ -134,7 +134,7 @@ fromwire_witness_element(const tal_t *ctx, const u8 **cursor, size_t *plen)
u16 len;
len = fromwire_u16(cursor, plen);
witness_element->witness = len ? tal_arr(witness_element, u8, len) : NULL;
witness_element->witness = tal_arr(witness_element, u8, len);
fromwire_u8_array(cursor, plen, witness_element->witness, len);
return witness_element;
@ -514,7 +514,7 @@ static void fromwire_tlv_open_channel_tlvs_upfront_shutdown_script(const u8 **cu
{
struct tlv_open_channel_tlvs *r = vrecord;
r->upfront_shutdown_script = *plen ? tal_arr(r, u8, *plen) : NULL;
r->upfront_shutdown_script = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->upfront_shutdown_script, *plen);
}
@ -568,7 +568,7 @@ static void fromwire_tlv_accept_channel_tlvs_upfront_shutdown_script(const u8 **
{
struct tlv_accept_channel_tlvs *r = vrecord;
r->upfront_shutdown_script = *plen ? tal_arr(r, u8, *plen) : NULL;
r->upfront_shutdown_script = tal_arr(r, u8, *plen);
fromwire_u8_array(cursor, plen, r->upfront_shutdown_script, *plen);
}
@ -628,7 +628,7 @@ static void fromwire_tlv_opening_tlvs_option_upfront_shutdown_script(const u8 **
r->option_upfront_shutdown_script = tal(r, struct tlv_opening_tlvs_option_upfront_shutdown_script);
shutdown_len = fromwire_u16(cursor, plen);
r->option_upfront_shutdown_script->shutdown_scriptpubkey = shutdown_len ? tal_arr(r->option_upfront_shutdown_script, u8, shutdown_len) : NULL;
r->option_upfront_shutdown_script->shutdown_scriptpubkey = tal_arr(r->option_upfront_shutdown_script, u8, shutdown_len);
fromwire_u8_array(cursor, plen, r->option_upfront_shutdown_script->shutdown_scriptpubkey, shutdown_len);
}
/* OPENING_TLVS MSG: request_funds */
@ -714,7 +714,7 @@ static void fromwire_tlv_accept_tlvs_option_upfront_shutdown_script(const u8 **c
r->option_upfront_shutdown_script = tal(r, struct tlv_accept_tlvs_option_upfront_shutdown_script);
shutdown_len = fromwire_u16(cursor, plen);
r->option_upfront_shutdown_script->shutdown_scriptpubkey = shutdown_len ? tal_arr(r->option_upfront_shutdown_script, u8, shutdown_len) : NULL;
r->option_upfront_shutdown_script->shutdown_scriptpubkey = tal_arr(r->option_upfront_shutdown_script, u8, shutdown_len);
fromwire_u8_array(cursor, plen, r->option_upfront_shutdown_script->shutdown_scriptpubkey, shutdown_len);
}
/* ACCEPT_TLVS MSG: will_fund */
@ -910,7 +910,7 @@ static void fromwire_tlv_query_short_channel_ids_tlvs_query_flags(const u8 **cur
r->query_flags = tal(r, struct tlv_query_short_channel_ids_tlvs_query_flags);
r->query_flags->encoding_type = fromwire_u8(cursor, plen);
r->query_flags->encoded_query_flags = *plen ? tal_arr(r->query_flags, u8, *plen) : NULL;
r->query_flags->encoded_query_flags = tal_arr(r->query_flags, u8, *plen);
fromwire_u8_array(cursor, plen, r->query_flags->encoded_query_flags, *plen);
}
@ -1023,7 +1023,7 @@ static void fromwire_tlv_reply_channel_range_tlvs_timestamps_tlv(const u8 **curs
r->timestamps_tlv = tal(r, struct tlv_reply_channel_range_tlvs_timestamps_tlv);
r->timestamps_tlv->encoding_type = fromwire_u8(cursor, plen);
r->timestamps_tlv->encoded_timestamps = *plen ? tal_arr(r->timestamps_tlv, u8, *plen) : NULL;
r->timestamps_tlv->encoded_timestamps = tal_arr(r->timestamps_tlv, u8, *plen);
fromwire_u8_array(cursor, plen, r->timestamps_tlv->encoded_timestamps, *plen);
}
/* REPLY_CHANNEL_RANGE_TLVS MSG: checksums_tlv */
@ -2484,4 +2484,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:7c9612ec7cc62b3a44ae65d19b855b521e96796940b4c3d50977d768ace8712e
// SHA256STAMP:7acdb2f85dec7c26fb60ae3302f387fbccae349e182d05c6e4bb043ce2546797

View File

@ -930,4 +930,4 @@ bool fromwire_channel_update_option_channel_htlc_max(const void *p, secp256k1_ec
#endif /* LIGHTNING_WIRE_PEER_WIREGEN_H */
// SHA256STAMP:7c9612ec7cc62b3a44ae65d19b855b521e96796940b4c3d50977d768ace8712e
// SHA256STAMP:7acdb2f85dec7c26fb60ae3302f387fbccae349e182d05c6e4bb043ce2546797