@@ -26,7 +26,7 @@ use crate::offers::invoice_request::InvoiceRequestFields;
26
26
use crate :: offers:: offer:: OfferId ;
27
27
use crate :: routing:: gossip:: { NodeId , ReadOnlyNetworkGraph } ;
28
28
use crate :: sign:: { EntropySource , NodeSigner , Recipient } ;
29
- use crate :: util:: ser:: { FixedLengthReader , LengthReadableArgs , HighZeroBytesDroppedBigSize , Readable , Writeable , Writer } ;
29
+ use crate :: util:: ser:: { FixedLengthReader , LengthReadableArgs , HighZeroBytesDroppedBigSize , Readable , WithoutLength , Writeable , Writer } ;
30
30
31
31
use core:: mem;
32
32
use core:: ops:: Deref ;
@@ -344,7 +344,7 @@ impl Writeable for ForwardTlvs {
344
344
fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , io:: Error > {
345
345
let features_opt =
346
346
if self . features == BlindedHopFeatures :: empty ( ) { None }
347
- else { Some ( & self . features ) } ;
347
+ else { Some ( WithoutLength ( & self . features ) ) } ;
348
348
encode_tlv_stream ! ( w, {
349
349
( 2 , self . short_channel_id, required) ,
350
350
( 10 , self . payment_relay, required) ,
@@ -385,7 +385,7 @@ impl Readable for BlindedPaymentTlvs {
385
385
( 8 , next_blinding_override, option) ,
386
386
( 10 , payment_relay, option) ,
387
387
( 12 , payment_constraints, required) ,
388
- ( 14 , features, option) ,
388
+ ( 14 , features, ( option, encoding : ( BlindedHopFeatures , WithoutLength ) ) ) ,
389
389
( 65536 , payment_secret, option) ,
390
390
( 65537 , payment_context, ( default_value, PaymentContext :: unknown( ) ) ) ,
391
391
} ) ;
0 commit comments