diff --git a/channeld/channeld_wiregen.c b/channeld/channeld_wiregen.c index edfec2ce4b4a..d0f252459fa6 100644 --- a/channeld/channeld_wiregen.c +++ b/channeld/channeld_wiregen.c @@ -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 diff --git a/channeld/channeld_wiregen.h b/channeld/channeld_wiregen.h index e52eafa2019b..3ee7f2addf9b 100644 --- a/channeld/channeld_wiregen.h +++ b/channeld/channeld_wiregen.h @@ -240,4 +240,4 @@ bool fromwire_channeld_blockheight(const void *p, u32 *blockheight); #endif /* LIGHTNING_CHANNELD_CHANNELD_WIREGEN_H */ -// SHA256STAMP:977cf1dac7bbca4163cfbbf53f8f448430775368496205ee6f181eb4d8c8c8af +// SHA256STAMP:6f130803e485882bd3fee03f792036434d0a7062e1ba4ec6bc97756460d6b21a diff --git a/closingd/closingd_wiregen.c b/closingd/closingd_wiregen.c index e8c766b39a27..e53826507e43 100644 --- a/closingd/closingd_wiregen.c +++ b/closingd/closingd_wiregen.c @@ -195,4 +195,4 @@ bool fromwire_closingd_complete(const void *p) return false; return cursor != NULL; } -// SHA256STAMP:681e83ed1e1950220b1e9dbf168e5583e23120981b9a084eab5bc6ce1bc9a1aa +// SHA256STAMP:961ca5ceef03f911684ba0e7863d69993e692b9b418108e6038a567cb7cc7b3e diff --git a/closingd/closingd_wiregen.h b/closingd/closingd_wiregen.h index 7d46f18b63f3..cc1ad7c9dfaa 100644 --- a/closingd/closingd_wiregen.h +++ b/closingd/closingd_wiregen.h @@ -56,4 +56,4 @@ bool fromwire_closingd_complete(const void *p); #endif /* LIGHTNING_CLOSINGD_CLOSINGD_WIREGEN_H */ -// SHA256STAMP:681e83ed1e1950220b1e9dbf168e5583e23120981b9a084eab5bc6ce1bc9a1aa +// SHA256STAMP:961ca5ceef03f911684ba0e7863d69993e692b9b418108e6038a567cb7cc7b3e diff --git a/common/peer_status_wiregen.c b/common/peer_status_wiregen.c index fa756278e897..15d6779589e3 100644 --- a/common/peer_status_wiregen.c +++ b/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:db80a04b587e0918ef55f7e82519f7ff86620c5ec4fd845452214059c1cdbd41 +// SHA256STAMP:4606ed7d72f93f4fe260080b8b6810ef1b0efa60e96d22b987a6bd16213e365f diff --git a/common/peer_status_wiregen.h b/common/peer_status_wiregen.h index 94978e02cec7..06a07885640a 100644 --- a/common/peer_status_wiregen.h +++ b/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:db80a04b587e0918ef55f7e82519f7ff86620c5ec4fd845452214059c1cdbd41 +// SHA256STAMP:4606ed7d72f93f4fe260080b8b6810ef1b0efa60e96d22b987a6bd16213e365f diff --git a/common/status_wiregen.c b/common/status_wiregen.c index 90da24ae2783..46b1aec4c840 100644 --- a/common/status_wiregen.c +++ b/common/status_wiregen.c @@ -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 diff --git a/common/status_wiregen.h b/common/status_wiregen.h index 202ac0143bbd..d5b59d53aac5 100644 --- a/common/status_wiregen.h +++ b/common/status_wiregen.h @@ -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 diff --git a/connectd/connectd_gossipd_wiregen.c b/connectd/connectd_gossipd_wiregen.c index 1830b4707dc3..1394358718fe 100644 --- a/connectd/connectd_gossipd_wiregen.c +++ b/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:a115dcd604f1bcbe48bf57b25bfc2b59ec7eff3c4790812fa1c460aee2b50811 +// SHA256STAMP:f046184497c8415e2e1337f2b82412bc0094c9c7935e5a3312560331ca6c9f32 diff --git a/connectd/connectd_gossipd_wiregen.h b/connectd/connectd_gossipd_wiregen.h index 2dfc3b12b4f2..36934ba14f08 100644 --- a/connectd/connectd_gossipd_wiregen.h +++ b/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:a115dcd604f1bcbe48bf57b25bfc2b59ec7eff3c4790812fa1c460aee2b50811 +// SHA256STAMP:f046184497c8415e2e1337f2b82412bc0094c9c7935e5a3312560331ca6c9f32 diff --git a/connectd/connectd_wiregen.c b/connectd/connectd_wiregen.c index 63e764fa3644..2426dacaa9c2 100644 --- a/connectd/connectd_wiregen.c +++ b/connectd/connectd_wiregen.c @@ -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 diff --git a/connectd/connectd_wiregen.h b/connectd/connectd_wiregen.h index e4f5c6504207..eb1c87b561e6 100644 --- a/connectd/connectd_wiregen.h +++ b/connectd/connectd_wiregen.h @@ -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 diff --git a/doc/lightning-offer.7 b/doc/lightning-offer.7 index 54d4cf80054f..3c189b5bdb9c 100644 --- a/doc/lightning-offer.7 +++ b/doc/lightning-offer.7 @@ -159,4 +159,4 @@ Rusty Russell \fI is mainly responsible\. Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:bd1bae6f6b56d4efa95e17b7aff042b897acacdd783cef7df0dd729f6c9b5d8f +\" SHA256STAMP:e6b321a49c0613e9812343cdc252850930569e63e19291afbcbf6a4a135d2552 diff --git a/gossipd/gossip_store_wiregen.c b/gossipd/gossip_store_wiregen.c index 7dee245adcb5..adcda3ddf1bb 100644 --- a/gossipd/gossip_store_wiregen.c +++ b/gossipd/gossip_store_wiregen.c @@ -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 diff --git a/gossipd/gossip_store_wiregen.h b/gossipd/gossip_store_wiregen.h index 8788114fb449..203966c2c832 100644 --- a/gossipd/gossip_store_wiregen.h +++ b/gossipd/gossip_store_wiregen.h @@ -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 diff --git a/gossipd/gossipd_peerd_wiregen.c b/gossipd/gossipd_peerd_wiregen.c index f44c95924881..86518988fb43 100644 --- a/gossipd/gossipd_peerd_wiregen.c +++ b/gossipd/gossipd_peerd_wiregen.c @@ -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 diff --git a/gossipd/gossipd_peerd_wiregen.h b/gossipd/gossipd_peerd_wiregen.h index 5dd30cd8a81c..6a0cbc33d6bf 100644 --- a/gossipd/gossipd_peerd_wiregen.h +++ b/gossipd/gossipd_peerd_wiregen.h @@ -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 diff --git a/gossipd/gossipd_wiregen.c b/gossipd/gossipd_wiregen.c index 0c0b3171bcc2..85fc20f5b837 100644 --- a/gossipd/gossipd_wiregen.c +++ b/gossipd/gossipd_wiregen.c @@ -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 diff --git a/gossipd/gossipd_wiregen.h b/gossipd/gossipd_wiregen.h index 7a21446be492..0d3b1385dcdb 100644 --- a/gossipd/gossipd_wiregen.h +++ b/gossipd/gossipd_wiregen.h @@ -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 diff --git a/hsmd/hsmd_wiregen.c b/hsmd/hsmd_wiregen.c index 1ffce0751a96..42047696fb37 100644 --- a/hsmd/hsmd_wiregen.c +++ b/hsmd/hsmd_wiregen.c @@ -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 diff --git a/hsmd/hsmd_wiregen.h b/hsmd/hsmd_wiregen.h index 830d52f62c3a..6bbeee96e538 100644 --- a/hsmd/hsmd_wiregen.h +++ b/hsmd/hsmd_wiregen.h @@ -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 diff --git a/onchaind/onchaind_wiregen.c b/onchaind/onchaind_wiregen.c index 91ca990a9178..1b1b1d81e82e 100644 --- a/onchaind/onchaind_wiregen.c +++ b/onchaind/onchaind_wiregen.c @@ -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 diff --git a/onchaind/onchaind_wiregen.h b/onchaind/onchaind_wiregen.h index e8a4d758935b..8b7afbb44ab3 100644 --- a/onchaind/onchaind_wiregen.h +++ b/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:5aa638efffb78c0f1cac4889fb37e3666792ad716f7db66c925b4640628ffbde +// SHA256STAMP:f226dc95c62a951ec3fa958313783f65daff69034a06ef4188b81ca80fe7b53a diff --git a/openingd/dualopend_wiregen.c b/openingd/dualopend_wiregen.c index 605e51e2c454..c37c75869434 100644 --- a/openingd/dualopend_wiregen.c +++ b/openingd/dualopend_wiregen.c @@ -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 diff --git a/openingd/dualopend_wiregen.h b/openingd/dualopend_wiregen.h index c4f693f21b98..0c40a3565ab6 100644 --- a/openingd/dualopend_wiregen.h +++ b/openingd/dualopend_wiregen.h @@ -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 diff --git a/openingd/openingd_wiregen.c b/openingd/openingd_wiregen.c index be6688027f3e..07aa2d2fae5f 100644 --- a/openingd/openingd_wiregen.c +++ b/openingd/openingd_wiregen.c @@ -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 diff --git a/openingd/openingd_wiregen.h b/openingd/openingd_wiregen.h index d319eb102079..91d752e57d2d 100644 --- a/openingd/openingd_wiregen.h +++ b/openingd/openingd_wiregen.h @@ -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 diff --git a/tests/test_pay.py b/tests/test_pay.py index 64e92f3adb9e..545961be8378 100644 --- a/tests/test_pay.py +++ b/tests/test_pay.py @@ -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}) diff --git a/tools/gen/impl_template b/tools/gen/impl_template index ad4b62e5c4ce..61f643598f1d 100644 --- a/tools/gen/impl_template +++ b/tools/gen/impl_template @@ -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: diff --git a/wire/bolt12_wiregen.c b/wire/bolt12_wiregen.c index 62b68352052b..171cd8c7e6ad 100644 --- a/wire/bolt12_wiregen.c +++ b/wire/bolt12_wiregen.c @@ -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 diff --git a/wire/bolt12_wiregen.h b/wire/bolt12_wiregen.h index 527125b7b7ca..a07edec15367 100644 --- a/wire/bolt12_wiregen.h +++ b/wire/bolt12_wiregen.h @@ -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 diff --git a/wire/common_wiregen.c b/wire/common_wiregen.c index d61d6405eadd..4c4d39178f28 100644 --- a/wire/common_wiregen.c +++ b/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:959a0af7e5dc054bc1bd313dee486b3c2040853b8f3772d889e51048e14ac2b5 +// SHA256STAMP:5e31b6f1281965e31e28ce8a6d1a7e54635170b877bbd11b6ec09cba60f317aa diff --git a/wire/common_wiregen.h b/wire/common_wiregen.h index ad19ec882098..d6a013dc2d92 100644 --- a/wire/common_wiregen.h +++ b/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:959a0af7e5dc054bc1bd313dee486b3c2040853b8f3772d889e51048e14ac2b5 +// SHA256STAMP:5e31b6f1281965e31e28ce8a6d1a7e54635170b877bbd11b6ec09cba60f317aa diff --git a/wire/onion_printgen.c b/wire/onion_printgen.c index d4d237fb4112..b0a7b81c85e8 100644 --- a/wire/onion_printgen.c +++ b/wire/onion_printgen.c @@ -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 diff --git a/wire/onion_printgen.h b/wire/onion_printgen.h index fa2e5b1e44a2..7acaf3be8446 100644 --- a/wire/onion_printgen.h +++ b/wire/onion_printgen.h @@ -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 diff --git a/wire/onion_wiregen.c b/wire/onion_wiregen.c index c6b47b0522e0..9272b70966a5 100644 --- a/wire/onion_wiregen.c +++ b/wire/onion_wiregen.c @@ -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 diff --git a/wire/onion_wiregen.h b/wire/onion_wiregen.h index 479c89b61041..d5c9a0ac876a 100644 --- a/wire/onion_wiregen.h +++ b/wire/onion_wiregen.h @@ -317,4 +317,4 @@ bool fromwire_mpp_timeout(const void *p); #endif /* LIGHTNING_WIRE_ONION_WIREGEN_H */ -// SHA256STAMP:fcaea2b057478205299b8935161c994fece0e410e6942503943747625ddcfc8a +// SHA256STAMP:79946dd94a6cd6e0af297d3676c688228c7098e6b874469cd49b63fee97ac8cf diff --git a/wire/peer_printgen.c b/wire/peer_printgen.c index 6b40e3a0ea32..f36f70eccb72 100644 --- a/wire/peer_printgen.c +++ b/wire/peer_printgen.c @@ -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 diff --git a/wire/peer_printgen.h b/wire/peer_printgen.h index 997adc7fc320..99c8995603dd 100644 --- a/wire/peer_printgen.h +++ b/wire/peer_printgen.h @@ -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 diff --git a/wire/peer_wiregen.c b/wire/peer_wiregen.c index 5c706df2fc9e..3365a3e8d4bb 100644 --- a/wire/peer_wiregen.c +++ b/wire/peer_wiregen.c @@ -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 diff --git a/wire/peer_wiregen.h b/wire/peer_wiregen.h index dc1b44de2af3..b6a2e1f60c06 100644 --- a/wire/peer_wiregen.h +++ b/wire/peer_wiregen.h @@ -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