From 82c0b48215e0786f536bc8ff555ef89952ccc82d Mon Sep 17 00:00:00 2001 From: niftynei Date: Fri, 11 Sep 2020 13:55:22 -0500 Subject: [PATCH] wires: towire/fromwire for wally_tx We're eventually moving away from 'bitcoin_tx --- bitcoin/tx.c | 53 ++++++++++++++++++++++------- bitcoin/tx.h | 2 ++ channeld/channeld_wiregen.c | 2 +- channeld/channeld_wiregen.h | 2 +- closingd/closingd_wiregen.c | 2 +- closingd/closingd_wiregen.h | 2 +- common/peer_status_wiregen.c | 2 +- common/peer_status_wiregen.h | 2 +- common/status_wiregen.c | 2 +- common/status_wiregen.h | 2 +- connectd/connectd_gossipd_wiregen.c | 2 +- connectd/connectd_gossipd_wiregen.h | 2 +- connectd/connectd_wiregen.c | 2 +- connectd/connectd_wiregen.h | 2 +- gossipd/gossip_store_wiregen.c | 2 +- gossipd/gossip_store_wiregen.h | 2 +- gossipd/gossipd_peerd_wiregen.c | 2 +- gossipd/gossipd_peerd_wiregen.h | 2 +- gossipd/gossipd_wiregen.c | 2 +- gossipd/gossipd_wiregen.h | 2 +- hsmd/hsmd_wiregen.c | 2 +- hsmd/hsmd_wiregen.h | 2 +- onchaind/onchaind_wiregen.c | 2 +- onchaind/onchaind_wiregen.h | 2 +- openingd/dualopend_wiregen.c | 2 +- openingd/dualopend_wiregen.h | 2 +- openingd/openingd_wiregen.c | 2 +- openingd/openingd_wiregen.h | 2 +- tools/generate-wire.py | 1 + wire/common_wiregen.c | 2 +- wire/common_wiregen.h | 2 +- wire/onion_printgen.c | 2 +- wire/onion_printgen.h | 2 +- wire/onion_wiregen.c | 2 +- wire/onion_wiregen.h | 2 +- wire/peer_printgen.c | 2 +- wire/peer_printgen.h | 2 +- wire/peer_wiregen.c | 2 +- wire/peer_wiregen.h | 2 +- 39 files changed, 80 insertions(+), 48 deletions(-) diff --git a/bitcoin/tx.c b/bitcoin/tx.c index 3bb581f2c..16dbc39b4 100644 --- a/bitcoin/tx.c +++ b/bitcoin/tx.c @@ -547,32 +547,45 @@ struct bitcoin_tx *bitcoin_tx_with_psbt(const tal_t *ctx, struct wally_psbt *psb return tx; } -struct bitcoin_tx *pull_bitcoin_tx(const tal_t *ctx, const u8 **cursor, - size_t *max) +static struct wally_tx *pull_wtx(const tal_t *ctx, + const u8 **cursor, + size_t *max) { int flags = WALLY_TX_FLAG_USE_WITNESS; - struct bitcoin_tx *tx = tal(ctx, struct bitcoin_tx); + struct wally_tx *wtx; if (chainparams->is_elements) flags |= WALLY_TX_FLAG_USE_ELEMENTS; tal_wally_start(); - if (wally_tx_from_bytes(*cursor, *max, flags, &tx->wtx) != WALLY_OK) { + if (wally_tx_from_bytes(*cursor, *max, flags, &wtx) != WALLY_OK) { fromwire_fail(cursor, max); - tx = tal_free(tx); + wtx = tal_free(wtx); } - tal_wally_end(tx); + tal_wally_end(tal_steal(ctx, wtx)); - if (tx) { + if (wtx) { size_t wsize; - tal_add_destructor(tx, bitcoin_tx_destroy); - tx->chainparams = chainparams; - tx->psbt = new_psbt(tx, tx->wtx); - - wally_tx_get_length(tx->wtx, flags, &wsize); + wally_tx_get_length(wtx, flags, &wsize); *cursor += wsize; *max -= wsize; } + + return wtx; +} + +struct bitcoin_tx *pull_bitcoin_tx(const tal_t *ctx, const u8 **cursor, + size_t *max) +{ + struct bitcoin_tx *tx = tal(ctx, struct bitcoin_tx); + tx->wtx = pull_wtx(tx, cursor, max); + if (!tx->wtx) + return tal_free(tx); + + tal_add_destructor(tx, bitcoin_tx_destroy); + tx->chainparams = chainparams; + tx->psbt = new_psbt(tx, tx->wtx); + return tx; } @@ -691,6 +704,16 @@ struct bitcoin_tx *fromwire_bitcoin_tx(const tal_t *ctx, return tx; } +struct wally_tx *fromwire_wally_tx(const tal_t *ctx, + const u8 **cursor, size_t *max) +{ + struct wally_tx *wtx; + wtx = pull_wtx(ctx, cursor, max); + if (!wtx) + return fromwire_fail(cursor, max); + return wtx; +} + void towire_bitcoin_txid(u8 **pptr, const struct bitcoin_txid *txid) { towire_sha256_double(pptr, &txid->shad); @@ -704,6 +727,12 @@ void towire_bitcoin_tx(u8 **pptr, const struct bitcoin_tx *tx) towire_wally_psbt(pptr, tx->psbt); } +void towire_wally_tx(u8 **pptr, const struct wally_tx *wtx) +{ + u8 *lin = linearize_wtx(tmpctx, wtx); + towire_u8_array(pptr, lin, tal_count(lin)); +} + struct bitcoin_tx_output *fromwire_bitcoin_tx_output(const tal_t *ctx, const u8 **cursor, size_t *max) { diff --git a/bitcoin/tx.h b/bitcoin/tx.h index 2c2a87636..73c3173a2 100644 --- a/bitcoin/tx.h +++ b/bitcoin/tx.h @@ -242,9 +242,11 @@ struct bitcoin_tx *fromwire_bitcoin_tx(const tal_t *ctx, const u8 **cursor, size_t *max); struct bitcoin_tx_output *fromwire_bitcoin_tx_output(const tal_t *ctx, const u8 **cursor, size_t *max); +struct wally_tx *fromwire_wally_tx(const tal_t *ctx, const u8 **cursor, size_t *max); void towire_bitcoin_txid(u8 **pptr, const struct bitcoin_txid *txid); void towire_bitcoin_tx(u8 **pptr, const struct bitcoin_tx *tx); void towire_bitcoin_tx_output(u8 **pptr, const struct bitcoin_tx_output *output); +void towire_wally_tx(u8 **pptr, const struct wally_tx *wtx); /* Various weights of transaction parts. */ size_t bitcoin_tx_core_weight(size_t num_inputs, size_t num_outputs); diff --git a/channeld/channeld_wiregen.c b/channeld/channeld_wiregen.c index 5003426ea..16eaa9aa8 100644 --- a/channeld/channeld_wiregen.c +++ b/channeld/channeld_wiregen.c @@ -1194,4 +1194,4 @@ bool fromwire_send_onionmsg(const tal_t *ctx, const void *p, u8 onion[1366], str } return cursor != NULL; } -// SHA256STAMP:196c40ae481aa8f2608224504803e3c2ad1b56a67621afecddc2d0a4cee7b5ab +// SHA256STAMP:51cb93dbaf723c888a9ac8f99222c4e85b64bfdefcd374ae62f6557e9d628d8b diff --git a/channeld/channeld_wiregen.h b/channeld/channeld_wiregen.h index 2892a61c5..0fa72565a 100644 --- a/channeld/channeld_wiregen.h +++ b/channeld/channeld_wiregen.h @@ -230,4 +230,4 @@ bool fromwire_send_onionmsg(const tal_t *ctx, const void *p, u8 onion[1366], str #endif /* LIGHTNING_CHANNELD_CHANNELD_WIREGEN_H */ -// SHA256STAMP:196c40ae481aa8f2608224504803e3c2ad1b56a67621afecddc2d0a4cee7b5ab +// SHA256STAMP:51cb93dbaf723c888a9ac8f99222c4e85b64bfdefcd374ae62f6557e9d628d8b diff --git a/closingd/closingd_wiregen.c b/closingd/closingd_wiregen.c index 056c84c79..74fae8e54 100644 --- a/closingd/closingd_wiregen.c +++ b/closingd/closingd_wiregen.c @@ -201,4 +201,4 @@ bool fromwire_closingd_complete(const void *p) return false; return cursor != NULL; } -// SHA256STAMP:664db8fb57633e011ada21807fd769629695c05674062176ac7de1a286b0ffaa +// SHA256STAMP:c9a8c207d4b03e4a8a63e24b8cf04bdcdce031f05ce238c23d66861736d38093 diff --git a/closingd/closingd_wiregen.h b/closingd/closingd_wiregen.h index b1cdd2b37..38aad99f7 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:664db8fb57633e011ada21807fd769629695c05674062176ac7de1a286b0ffaa +// SHA256STAMP:c9a8c207d4b03e4a8a63e24b8cf04bdcdce031f05ce238c23d66861736d38093 diff --git a/common/peer_status_wiregen.c b/common/peer_status_wiregen.c index e1419f7b3..c956e5718 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:bc318346991200715cc7da8c316d95d8cd6550df8f519b9a881ad05dba8f7a2f +// SHA256STAMP:81ce8c48fa95942e161b6a69f86271f538f58e32c09ae4da068c4061d0cfcc87 diff --git a/common/peer_status_wiregen.h b/common/peer_status_wiregen.h index ba0e40d8e..2a287f616 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:bc318346991200715cc7da8c316d95d8cd6550df8f519b9a881ad05dba8f7a2f +// SHA256STAMP:81ce8c48fa95942e161b6a69f86271f538f58e32c09ae4da068c4061d0cfcc87 diff --git a/common/status_wiregen.c b/common/status_wiregen.c index c4aeac4df..910a19112 100644 --- a/common/status_wiregen.c +++ b/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:5466f9a61242645bb08568e375d9fc79de3ea12fa0fa0781aefe9ba1655ffc60 +// SHA256STAMP:adfe96ff3b9661f179d937c93c5457c38f20d1caeaaa646326ca0c6d5496a35c diff --git a/common/status_wiregen.h b/common/status_wiregen.h index 022891d42..87275e77f 100644 --- a/common/status_wiregen.h +++ b/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:5466f9a61242645bb08568e375d9fc79de3ea12fa0fa0781aefe9ba1655ffc60 +// SHA256STAMP:adfe96ff3b9661f179d937c93c5457c38f20d1caeaaa646326ca0c6d5496a35c diff --git a/connectd/connectd_gossipd_wiregen.c b/connectd/connectd_gossipd_wiregen.c index ba782146b..83cdf5566 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:2f5f91bebad6578d17e870896ed4ec165c2c6a5f96c165bf96688b62bab979c4 +// SHA256STAMP:4af15bf6b2957f298e162dd9b8f3a3d03057a417940827fbfaed5b72853bfe65 diff --git a/connectd/connectd_gossipd_wiregen.h b/connectd/connectd_gossipd_wiregen.h index 91a83e4e5..52aa8aa8d 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:2f5f91bebad6578d17e870896ed4ec165c2c6a5f96c165bf96688b62bab979c4 +// SHA256STAMP:4af15bf6b2957f298e162dd9b8f3a3d03057a417940827fbfaed5b72853bfe65 diff --git a/connectd/connectd_wiregen.c b/connectd/connectd_wiregen.c index 056ca8323..957d9713d 100644 --- a/connectd/connectd_wiregen.c +++ b/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:9fd9243147219385908fdb38926d8f65b968e0787f9c11bdb39f05879b23fdb7 +// SHA256STAMP:85f646a5218fd260c3e73d270ea8f59aa14cb3ca02d7805f23b988625ca4deee diff --git a/connectd/connectd_wiregen.h b/connectd/connectd_wiregen.h index 2c2b4091b..4ed444e9e 100644 --- a/connectd/connectd_wiregen.h +++ b/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:9fd9243147219385908fdb38926d8f65b968e0787f9c11bdb39f05879b23fdb7 +// SHA256STAMP:85f646a5218fd260c3e73d270ea8f59aa14cb3ca02d7805f23b988625ca4deee diff --git a/gossipd/gossip_store_wiregen.c b/gossipd/gossip_store_wiregen.c index 64fd73bda..1f8dfa7e1 100644 --- a/gossipd/gossip_store_wiregen.c +++ b/gossipd/gossip_store_wiregen.c @@ -117,4 +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:66a6b3bbee03d9cac4e8b665b66463b4c859f39cd62589595b824e50e47dde93 +// SHA256STAMP:f6c526c196880b46255eec167cd2dccccfc2e8cfae312683889dc67418a2d0b4 diff --git a/gossipd/gossip_store_wiregen.h b/gossipd/gossip_store_wiregen.h index ada81c461..ec83907b2 100644 --- a/gossipd/gossip_store_wiregen.h +++ b/gossipd/gossip_store_wiregen.h @@ -43,4 +43,4 @@ bool fromwire_gossip_store_delete_chan(const void *p, struct short_channel_id *s #endif /* LIGHTNING_GOSSIPD_GOSSIP_STORE_WIREGEN_H */ -// SHA256STAMP:66a6b3bbee03d9cac4e8b665b66463b4c859f39cd62589595b824e50e47dde93 +// SHA256STAMP:f6c526c196880b46255eec167cd2dccccfc2e8cfae312683889dc67418a2d0b4 diff --git a/gossipd/gossipd_peerd_wiregen.c b/gossipd/gossipd_peerd_wiregen.c index 3f9e5662d..2b67d03ef 100644 --- a/gossipd/gossipd_peerd_wiregen.c +++ b/gossipd/gossipd_peerd_wiregen.c @@ -226,4 +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:4a051b84f9c7bf5033cce47837e80b64aad358218b02a2b5f8e93f52e8c41423 +// SHA256STAMP:b7bd26d45b133237284bcea72ab584555716c57d414abebe71026279924cb4f2 diff --git a/gossipd/gossipd_peerd_wiregen.h b/gossipd/gossipd_peerd_wiregen.h index 6ef534d1f..4289baad8 100644 --- a/gossipd/gossipd_peerd_wiregen.h +++ b/gossipd/gossipd_peerd_wiregen.h @@ -76,4 +76,4 @@ bool fromwire_gossipd_local_channel_announcement(const tal_t *ctx, const void *p #endif /* LIGHTNING_GOSSIPD_GOSSIPD_PEERD_WIREGEN_H */ -// SHA256STAMP:4a051b84f9c7bf5033cce47837e80b64aad358218b02a2b5f8e93f52e8c41423 +// SHA256STAMP:b7bd26d45b133237284bcea72ab584555716c57d414abebe71026279924cb4f2 diff --git a/gossipd/gossipd_wiregen.c b/gossipd/gossipd_wiregen.c index cc0e239bd..1e3986d49 100644 --- a/gossipd/gossipd_wiregen.c +++ b/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:6ce3071ebd5a33eb293acbf27affcc9c0b567eff243a2a5d7abc0cb3d78be865 +// SHA256STAMP:9b93deed184d5f5c0d5a9e649fae6449645501ded555b63350bfa3ce8eef70ba diff --git a/gossipd/gossipd_wiregen.h b/gossipd/gossipd_wiregen.h index 5872113f2..132f77305 100644 --- a/gossipd/gossipd_wiregen.h +++ b/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:6ce3071ebd5a33eb293acbf27affcc9c0b567eff243a2a5d7abc0cb3d78be865 +// SHA256STAMP:9b93deed184d5f5c0d5a9e649fae6449645501ded555b63350bfa3ce8eef70ba diff --git a/hsmd/hsmd_wiregen.c b/hsmd/hsmd_wiregen.c index 431e9b773..2a02f0cd4 100644 --- a/hsmd/hsmd_wiregen.c +++ b/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:d6f98ef7795553b98254a57650fd3793895e38b84e924439acc5b42f56830c55 +// SHA256STAMP:9b185bdbec96768d072ab4f9aef455ff824ae1df85a4f036eb3e1dfe25a53482 diff --git a/hsmd/hsmd_wiregen.h b/hsmd/hsmd_wiregen.h index 5a44411e6..8636440d6 100644 --- a/hsmd/hsmd_wiregen.h +++ b/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:d6f98ef7795553b98254a57650fd3793895e38b84e924439acc5b42f56830c55 +// SHA256STAMP:9b185bdbec96768d072ab4f9aef455ff824ae1df85a4f036eb3e1dfe25a53482 diff --git a/onchaind/onchaind_wiregen.c b/onchaind/onchaind_wiregen.c index ebe1af136..faa8cd183 100644 --- a/onchaind/onchaind_wiregen.c +++ b/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:555dd2788c390570476f8794a3ae7100dd2df061e41c8253a17a45071b093138 +// SHA256STAMP:a7b7a9a01030d1a19fab69045268b63234ae9efb5129ec9282fb354015886759 diff --git a/onchaind/onchaind_wiregen.h b/onchaind/onchaind_wiregen.h index 8d7198a68..a52d274c9 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:555dd2788c390570476f8794a3ae7100dd2df061e41c8253a17a45071b093138 +// SHA256STAMP:a7b7a9a01030d1a19fab69045268b63234ae9efb5129ec9282fb354015886759 diff --git a/openingd/dualopend_wiregen.c b/openingd/dualopend_wiregen.c index 0499f6f9e..c1c802040 100644 --- a/openingd/dualopend_wiregen.c +++ b/openingd/dualopend_wiregen.c @@ -415,4 +415,4 @@ bool fromwire_dual_open_dev_memleak_reply(const void *p, bool *leak) *leak = fromwire_bool(&cursor, &plen); return cursor != NULL; } -// SHA256STAMP:bcf32211cd043903bbd2fadeb3795a0d120d1815beb895369eb9de32822d837a +// SHA256STAMP:05607d3abf4cb9831ce6e8a2be24cb6e446a949cd8e5fe69620556a2dbbdb772 diff --git a/openingd/dualopend_wiregen.h b/openingd/dualopend_wiregen.h index 1aae601a5..c0fccc62c 100644 --- a/openingd/dualopend_wiregen.h +++ b/openingd/dualopend_wiregen.h @@ -97,4 +97,4 @@ bool fromwire_dual_open_dev_memleak_reply(const void *p, bool *leak); #endif /* LIGHTNING_OPENINGD_DUALOPEND_WIREGEN_H */ -// SHA256STAMP:bcf32211cd043903bbd2fadeb3795a0d120d1815beb895369eb9de32822d837a +// SHA256STAMP:05607d3abf4cb9831ce6e8a2be24cb6e446a949cd8e5fe69620556a2dbbdb772 diff --git a/openingd/openingd_wiregen.c b/openingd/openingd_wiregen.c index af710e93e..13cc900a0 100644 --- a/openingd/openingd_wiregen.c +++ b/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:d8910d3710d2093789fcd6cfd9ee55a001e69af89213a93426e4b28c6760672d +// SHA256STAMP:99ae0c1ae30e7a4f4d6a890665a6dafbb3f3900ab9f2a99a01a734fa968b2edf diff --git a/openingd/openingd_wiregen.h b/openingd/openingd_wiregen.h index c4e4b7315..5c73687bc 100644 --- a/openingd/openingd_wiregen.h +++ b/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:d8910d3710d2093789fcd6cfd9ee55a001e69af89213a93426e4b28c6760672d +// SHA256STAMP:99ae0c1ae30e7a4f4d6a890665a6dafbb3f3900ab9f2a99a01a734fa968b2edf diff --git a/tools/generate-wire.py b/tools/generate-wire.py index 4aaeb3e90..c5112e5ab 100755 --- a/tools/generate-wire.py +++ b/tools/generate-wire.py @@ -236,6 +236,7 @@ class Type(FieldSet): 'route_hop', 'tx_parts', 'wally_psbt', + 'wally_tx', ] # Some BOLT types are re-typed based on their field name diff --git a/wire/common_wiregen.c b/wire/common_wiregen.c index 1973ecebb..18db41a63 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:46dc20ac46005d9a0239d3e5eb012c76d068edd1d0cb74e3efd07b28f1eb9246 +// SHA256STAMP:c8a40362138ff8fcffde2285cda2c85cdfbf66a19591d4bd61066dbe21eda68c diff --git a/wire/common_wiregen.h b/wire/common_wiregen.h index 472ab6a86..4e2fcf05d 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:46dc20ac46005d9a0239d3e5eb012c76d068edd1d0cb74e3efd07b28f1eb9246 +// SHA256STAMP:c8a40362138ff8fcffde2285cda2c85cdfbf66a19591d4bd61066dbe21eda68c diff --git a/wire/onion_printgen.c b/wire/onion_printgen.c index a11c7ca75..3c2917de5 100644 --- a/wire/onion_printgen.c +++ b/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:43b0761145cf51e4de37f46c966c199ba305d02ca43e03350151e8435b9b1153 +// SHA256STAMP:6f34c3287d2f8abec14ecd33fe8340b82298a34959e96a752f8dafc0762b8f65 diff --git a/wire/onion_printgen.h b/wire/onion_printgen.h index 86aadfe3d..a420804d0 100644 --- a/wire/onion_printgen.h +++ b/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:43b0761145cf51e4de37f46c966c199ba305d02ca43e03350151e8435b9b1153 +// SHA256STAMP:6f34c3287d2f8abec14ecd33fe8340b82298a34959e96a752f8dafc0762b8f65 diff --git a/wire/onion_wiregen.c b/wire/onion_wiregen.c index 2e6bd61fb..5bf3d0d7f 100644 --- a/wire/onion_wiregen.c +++ b/wire/onion_wiregen.c @@ -837,4 +837,4 @@ bool fromwire_mpp_timeout(const void *p) return false; return cursor != NULL; } -// SHA256STAMP:43b0761145cf51e4de37f46c966c199ba305d02ca43e03350151e8435b9b1153 +// SHA256STAMP:6f34c3287d2f8abec14ecd33fe8340b82298a34959e96a752f8dafc0762b8f65 diff --git a/wire/onion_wiregen.h b/wire/onion_wiregen.h index 59a798427..f8add95bf 100644 --- a/wire/onion_wiregen.h +++ b/wire/onion_wiregen.h @@ -207,4 +207,4 @@ bool fromwire_mpp_timeout(const void *p); #endif /* LIGHTNING_WIRE_ONION_WIREGEN_H */ -// SHA256STAMP:43b0761145cf51e4de37f46c966c199ba305d02ca43e03350151e8435b9b1153 +// SHA256STAMP:6f34c3287d2f8abec14ecd33fe8340b82298a34959e96a752f8dafc0762b8f65 diff --git a/wire/peer_printgen.c b/wire/peer_printgen.c index 31dc92885..f33929615 100644 --- a/wire/peer_printgen.c +++ b/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:c950ebb221bc14a97d377d804daa828196be344fa4addae32351ec8a135ed45a +// SHA256STAMP:cb418f8296955fdcd26b9f06259a0c120007b543bc167f486989ac289a48c4af diff --git a/wire/peer_printgen.h b/wire/peer_printgen.h index c26301c3a..9d3548ac8 100644 --- a/wire/peer_printgen.h +++ b/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:c950ebb221bc14a97d377d804daa828196be344fa4addae32351ec8a135ed45a +// SHA256STAMP:cb418f8296955fdcd26b9f06259a0c120007b543bc167f486989ac289a48c4af diff --git a/wire/peer_wiregen.c b/wire/peer_wiregen.c index 5cfc93cd1..6cfc2ff03 100644 --- a/wire/peer_wiregen.c +++ b/wire/peer_wiregen.c @@ -2750,4 +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:c950ebb221bc14a97d377d804daa828196be344fa4addae32351ec8a135ed45a +// SHA256STAMP:cb418f8296955fdcd26b9f06259a0c120007b543bc167f486989ac289a48c4af diff --git a/wire/peer_wiregen.h b/wire/peer_wiregen.h index f05f4f512..56e96ff31 100644 --- a/wire/peer_wiregen.h +++ b/wire/peer_wiregen.h @@ -595,4 +595,4 @@ bool fromwire_channel_update_option_channel_htlc_max(const void *p, secp256k1_ec #endif /* LIGHTNING_WIRE_PEER_WIREGEN_H */ -// SHA256STAMP:c950ebb221bc14a97d377d804daa828196be344fa4addae32351ec8a135ed45a +// SHA256STAMP:cb418f8296955fdcd26b9f06259a0c120007b543bc167f486989ac289a48c4af