Commit Graph

7 Commits

Author SHA1 Message Date
Christian Decker 514c4044c8 tlv: Allow passing a raw pointer and a length to tlvstream_set_raw
Allows us to do fewer allocations, since the argument doesn't have to be tal
allocated itself.

Suggested-by: Rusty Russell <@rustyrussell>
2020-07-13 14:19:16 +02:00
Christian Decker cb9debc229 tlv: Add generic getters and setters for tlvstream
Trying to rework the TLV streams to have a more homogenous interface to work
with. This is by no means a complete implementation, just the groundwork that
is going to be used by the wire code generator to generate the specific
accessors, but it's enough so we can manipulate TLV streams in the onion and
later just switch to the generated ones.
2020-07-01 12:19:02 +02:00
Christian Decker 1b32cc1c73 wire: Add a function to serialize a raw set of TLV fields
The generated wrappers will ignore the raw fields and will only consider the
shortcut fields. This function takes the raw fields and serializes them
instead.
2020-04-16 18:03:35 +09:30
Christian Decker 5a78671d9f wire: Remove unused fromwire_tlvs
We are now using the typesafe variant everywhere.
2019-12-03 00:37:15 +00:00
Christian Decker 2255024ead tlv: Add raw fields so we can store unknown fields as well 2019-11-22 04:40:25 +00:00
lisa neigut 281b4c241e bolt-gen: fixup the devtool/decodemsg printing facility
Fixup TLV handling in the bolt printing utility, `devtools/decodemsg`
2019-07-24 02:52:53 +00:00
Rusty Russell 7cf0006c78 wire/tlvstream: routines to marshal/unmarshal TLV streams.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-18 06:51:35 +00:00