Skip to content

Commit f719a8f

Browse files
committed
f - Use impl_writeable_tlv_stream
1 parent 8c86d0a commit f719a8f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lightning/src/offers/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@ use prelude::*;
2727
/// the underlying types.
2828
#[derive(Debug)]
2929
struct OfferTlvStream {
30-
_empty: (),
31-
chains: Option<WithoutLength<Vec<BlockHash>>>,
30+
chains: Vec<BlockHash>,
3231
currency: Option<WithoutLength<String>>,
3332
amount: Option<HighZeroBytesDroppedVarInt<u64>>,
3433
description: Option<WithoutLength<String>>,
3534
features: Option<OfferFeatures>,
3635
absolute_expiry: Option<HighZeroBytesDroppedVarInt<u64>>,
37-
paths: Option<WithoutLength<Vec<BlindedPath>>>,
36+
paths: Vec<BlindedPath>,
3837
issuer: Option<WithoutLength<String>>,
3938
quantity_min: Option<HighZeroBytesDroppedVarInt<u64>>,
4039
quantity_max: Option<HighZeroBytesDroppedVarInt<u64>>,
@@ -45,14 +44,14 @@ struct OfferTlvStream {
4544
signature: Option<Signature>,
4645
}
4746

48-
impl_writeable_msg!(OfferTlvStream, { _empty }, {
49-
(2, chains, option),
47+
impl_writeable_tlv_stream!(OfferTlvStream, {
48+
(2, chains, vec_type),
5049
(6, currency, option),
5150
(8, amount, option),
5251
(10, description, option),
5352
(12, features, option),
5453
(14, absolute_expiry, option),
55-
(16, paths, option),
54+
(16, paths, vec_type),
5655
(20, issuer, option),
5756
(22, quantity_min, option),
5857
(24, quantity_max, option),

0 commit comments

Comments
 (0)