Macro breez_sdk_core::lightning::write_tlv_fields

macro_rules! write_tlv_fields {
    ($stream: expr, {$(($type: expr, $field: expr, $fieldty: tt)),* $(,)*}) => { ... };
}
Expand description

Writes out a suffix to an object as a length-prefixed TLV stream which contains potentially backwards-compatible, optional fields which old nodes can happily ignore.

It is written out in TLV format and, as with all TLV fields, unknown even fields cause a DecodeError::UnknownRequiredFeature error, with unknown odd fields ignored.

This is the preferred method of adding new fields that old nodes can ignore and still function correctly.