@@ -27,7 +27,7 @@ use crate::offers::invoice::BlindedPayInfo;
27
27
use crate :: offers:: invoice_request:: InvoiceRequestFields ;
28
28
use crate :: offers:: offer:: OfferId ;
29
29
use crate :: sign:: { NodeSigner , Recipient } ;
30
- use crate :: util:: ser:: { FixedLengthReader , LengthReadableArgs , HighZeroBytesDroppedBigSize , Readable , Writeable , Writer } ;
30
+ use crate :: util:: ser:: { FixedLengthReader , LengthReadableArgs , HighZeroBytesDroppedBigSize , Readable , WithoutLength , Writeable , Writer } ;
31
31
32
32
use core:: mem;
33
33
use core:: ops:: Deref ;
@@ -205,7 +205,7 @@ impl Writeable for ForwardTlvs {
205
205
fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , io:: Error > {
206
206
let features_opt =
207
207
if self . features == BlindedHopFeatures :: empty ( ) { None }
208
- else { Some ( & self . features ) } ;
208
+ else { Some ( WithoutLength ( & self . features ) ) } ;
209
209
encode_tlv_stream ! ( w, {
210
210
( 2 , self . short_channel_id, required) ,
211
211
( 10 , self . payment_relay, required) ,
@@ -246,7 +246,7 @@ impl Readable for BlindedPaymentTlvs {
246
246
( 8 , next_blinding_override, option) ,
247
247
( 10 , payment_relay, option) ,
248
248
( 12 , payment_constraints, required) ,
249
- ( 14 , features, option) ,
249
+ ( 14 , features, ( option, encoding : ( BlindedHopFeatures , WithoutLength ) ) ) ,
250
250
( 65536 , payment_secret, option) ,
251
251
( 65537 , payment_context, ( default_value, PaymentContext :: unknown( ) ) ) ,
252
252
} ) ;
0 commit comments