@@ -877,13 +877,12 @@ impl VerifiedInvoiceRequest {
877877 let InvoiceRequestContents {
878878 payer_id,
879879 inner : InvoiceRequestContentsWithoutPayerId {
880- payer : _, offer : _, chain : _, amount_msats : _, features, quantity, payer_note
880+ payer : _, offer : _, chain : _, amount_msats : _, features : _ , quantity, payer_note
881881 } ,
882882 } = & self . inner . contents ;
883883
884884 InvoiceRequestFields {
885885 payer_id : * payer_id,
886- features : features. clone ( ) ,
887886 quantity : * quantity,
888887 payer_note_truncated : payer_note. clone ( )
889888 . map ( |mut s| { s. truncate ( PAYER_NOTE_LIMIT ) ; UntrustedString ( s) } ) ,
@@ -1125,9 +1124,6 @@ pub struct InvoiceRequestFields {
11251124 /// A possibly transient pubkey used to sign the invoice request.
11261125 pub payer_id : PublicKey ,
11271126
1128- /// Features pertaining to requesting an invoice.
1129- pub features : InvoiceRequestFeatures ,
1130-
11311127 /// The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
11321128 pub quantity : Option < u64 > ,
11331129
@@ -1143,9 +1139,8 @@ impl Writeable for InvoiceRequestFields {
11431139 fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , io:: Error > {
11441140 write_tlv_fields ! ( writer, {
11451141 ( 0 , self . payer_id, required) ,
1146- ( 2 , WithoutLength ( & self . features) , required) ,
1147- ( 4 , self . quantity. map( |v| HighZeroBytesDroppedBigSize ( v) ) , option) ,
1148- ( 6 , self . payer_note_truncated. as_ref( ) . map( |s| WithoutLength ( & s. 0 ) ) , option) ,
1142+ ( 2 , self . quantity. map( |v| HighZeroBytesDroppedBigSize ( v) ) , option) ,
1143+ ( 4 , self . payer_note_truncated. as_ref( ) . map( |s| WithoutLength ( & s. 0 ) ) , option) ,
11491144 } ) ;
11501145 Ok ( ( ) )
11511146 }
@@ -1155,14 +1150,13 @@ impl Readable for InvoiceRequestFields {
11551150 fn read < R : io:: Read > ( reader : & mut R ) -> Result < Self , DecodeError > {
11561151 _init_and_read_len_prefixed_tlv_fields ! ( reader, {
11571152 ( 0 , payer_id, required) ,
1158- ( 2 , features, ( option, encoding: ( InvoiceRequestFeatures , WithoutLength ) ) ) ,
1159- ( 4 , quantity, ( option, encoding: ( u64 , HighZeroBytesDroppedBigSize ) ) ) ,
1160- ( 6 , payer_note_truncated, ( option, encoding: ( String , WithoutLength ) ) ) ,
1153+ ( 2 , quantity, ( option, encoding: ( u64 , HighZeroBytesDroppedBigSize ) ) ) ,
1154+ ( 4 , payer_note_truncated, ( option, encoding: ( String , WithoutLength ) ) ) ,
11611155 } ) ;
1162- let features = features. unwrap_or ( InvoiceRequestFeatures :: empty ( ) ) ;
11631156
11641157 Ok ( InvoiceRequestFields {
1165- payer_id : payer_id. 0 . unwrap ( ) , features, quantity,
1158+ payer_id : payer_id. 0 . unwrap ( ) ,
1159+ quantity,
11661160 payer_note_truncated : payer_note_truncated. map ( |s| UntrustedString ( s) ) ,
11671161 } )
11681162 }
@@ -2267,7 +2261,6 @@ mod tests {
22672261 fields,
22682262 InvoiceRequestFields {
22692263 payer_id: payer_pubkey( ) ,
2270- features: InvoiceRequestFeatures :: empty( ) ,
22712264 quantity: Some ( 1 ) ,
22722265 payer_note_truncated: Some ( UntrustedString ( "0" . repeat( PAYER_NOTE_LIMIT ) ) ) ,
22732266 }
0 commit comments