mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-03 22:34:21 +01:00
tools/generate-wire: no more lonely messages!
When we have only a single member in a TLV (e.g. an optional u64), wrapping it in a struct is awkward. This changes it to directly access those fields. This is not only more elegant (60 fewer lines), it would also be more cache friendly. That's right: cache hot singles! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
8d4abc1104
commit
b0c9059602
@@ -49,9 +49,8 @@ int main(int argc, char *argv[])
|
||||
tlvs = NULL;
|
||||
else if (argc == 6) {
|
||||
tlvs = tlv_query_channel_range_tlvs_new(ctx);
|
||||
tlvs->query_option = tal(tlvs, struct tlv_query_channel_range_tlvs_query_option);
|
||||
tlvs->query_option->query_option_flags
|
||||
= strtol(argv[5], NULL, 0);
|
||||
tlvs->query_option = tal(tlvs, varint);
|
||||
*tlvs->query_option = strtol(argv[5], NULL, 0);
|
||||
} else
|
||||
usage();
|
||||
msg = towire_query_channel_range(ctx, &chainhash,
|
||||
|
||||
Reference in New Issue
Block a user