Skip to content

Commit 3ee6506

Browse files
committed
f - explicit encodings
1 parent 42831da commit 3ee6506

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lightning/src/offers/invoice_request.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use offers::merkle::{SignatureTlvStream, self};
1919
use offers::offer::{Amount, OfferContents, OfferTlvStream};
2020
use offers::parse::{ParseError, SemanticError};
2121
use offers::payer::{PayerContents, PayerTlvStream};
22-
use util::ser::{Readable, WithoutLength, Writeable, Writer};
22+
use util::ser::{HighZeroBytesDroppedBigSize, Readable, WithoutLength, Writeable, Writer};
2323

2424
use prelude::*;
2525

@@ -123,11 +123,11 @@ impl TryFrom<Vec<u8>> for InvoiceRequest {
123123

124124
tlv_stream!(InvoiceRequestTlvStream, InvoiceRequestTlvStreamRef, {
125125
(80, chain: ChainHash),
126-
(82, amount: u64),
126+
(82, amount: (u64, HighZeroBytesDroppedBigSize)),
127127
(84, features: OfferFeatures),
128-
(86, quantity: u64),
128+
(86, quantity: (u64, HighZeroBytesDroppedBigSize)),
129129
(88, payer_id: PublicKey),
130-
(89, payer_note: String),
130+
(89, payer_note: (String, WithoutLength)),
131131
});
132132

133133
type ParsedInvoiceRequest = (Vec<u8>, FullInvoiceRequestTlvStream);

lightning/src/offers/payer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
//! Data structures and encoding for `invoice_request_payer_info` records.
1111
12+
use util::ser::WithoutLength;
13+
1214
use prelude::*;
1315

1416
/// An unpredictable sequence of bytes typically containing information needed to derive
@@ -19,5 +21,5 @@ use prelude::*;
1921
pub(crate) struct PayerContents(pub Option<Vec<u8>>);
2022

2123
tlv_stream!(PayerTlvStream, PayerTlvStreamRef, {
22-
(0, metadata: Vec<u8>),
24+
(0, metadata: (Vec<u8>, WithoutLength)),
2325
});

0 commit comments

Comments
 (0)