wire/tlvstream: add tlv_make_fields helper to populate ->fields array.

This is vital for calculating merkle trees; I previously used
towire+fromwire to get this!

Requires generation change so we can magic the ARRAY_SIZE var (the C
pre-processor can't uppercase things).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-12-04 10:30:22 +10:30
committed by neil saitug
parent 5c167d16ab
commit ff8830876d
39 changed files with 72 additions and 40 deletions

View File

@@ -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:ef3ea23ab28e4c27ad11e843929e17a304f58886570438d34f3fe9822af36dc9
// SHA256STAMP:6e03c4b93e8b0a2c6fd61f3bd0d23bf4898dd38d109c5a401ba05e9e4e68267e

View File

@@ -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:ef3ea23ab28e4c27ad11e843929e17a304f58886570438d34f3fe9822af36dc9
// SHA256STAMP:6e03c4b93e8b0a2c6fd61f3bd0d23bf4898dd38d109c5a401ba05e9e4e68267e

View File

@@ -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:467e6e1c97a006551a6ddd32fa4625f075628a268d689cbf65e2556b1e0781b7
// SHA256STAMP:18c1c9ce4dfed92c5fc6809cf716bf31cbb39fb8db124d43ead013088aff8b7c

View File

@@ -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:467e6e1c97a006551a6ddd32fa4625f075628a268d689cbf65e2556b1e0781b7
// SHA256STAMP:18c1c9ce4dfed92c5fc6809cf716bf31cbb39fb8db124d43ead013088aff8b7c

View File

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

View File

@@ -199,4 +199,4 @@ bool fromwire_gossipd_new_blockheight(const void *p, u32 *blockheight);
#endif /* LIGHTNING_GOSSIPD_GOSSIPD_WIREGEN_H */
// SHA256STAMP:957869c71b6b3ea4d1ec80c7ea4aa093b3738a4d9bc4d145fc429691ae7338e7
// SHA256STAMP:b9a39b664d2a598fb69e39147ff5d66e1abe5c9493db4a511bba6d2ecbcdfe29