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

@@ -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:ffe5ce4130de4968d0f46ba1dd28cfb4260caba13c9699c572dc3c192291fa60
// SHA256STAMP:612d608c07fc296757d24389b7a459a3f9b72285fafe342a5c8cd42fd3ec88af

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:ffe5ce4130de4968d0f46ba1dd28cfb4260caba13c9699c572dc3c192291fa60
// SHA256STAMP:612d608c07fc296757d24389b7a459a3f9b72285fafe342a5c8cd42fd3ec88af

View File

@@ -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:3d02340d94ac275095ca7839fed86b3da622aca2551e39a334a8c25c562a0ef7
// SHA256STAMP:022530b0ae77beecb3645526079c8727101593bd2a5881ecf556c9538c135d98

View File

@@ -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:3d02340d94ac275095ca7839fed86b3da622aca2551e39a334a8c25c562a0ef7
// SHA256STAMP:022530b0ae77beecb3645526079c8727101593bd2a5881ecf556c9538c135d98