@@ -93,17 +93,27 @@ pub struct PaymentConstraints {
9393 pub htlc_minimum_msat : u64 ,
9494}
9595
96- impl_writeable_tlv_based ! ( ForwardTlvs , {
97- ( 2 , short_channel_id, required) ,
98- ( 10 , payment_relay, required) ,
99- ( 12 , payment_constraints, required) ,
100- ( 14 , features, required) ,
101- } ) ;
102-
103- impl_writeable_tlv_based ! ( ReceiveTlvs , {
104- ( 12 , payment_constraints, required) ,
105- ( 65536 , payment_secret, required) ,
106- } ) ;
96+ impl Writeable for ForwardTlvs {
97+ fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , io:: Error > {
98+ encode_tlv_stream ! ( w, {
99+ ( 2 , self . short_channel_id, required) ,
100+ ( 10 , self . payment_relay, required) ,
101+ ( 12 , self . payment_constraints, required) ,
102+ ( 14 , self . features, required)
103+ } ) ;
104+ Ok ( ( ) )
105+ }
106+ }
107+
108+ impl Writeable for ReceiveTlvs {
109+ fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , io:: Error > {
110+ encode_tlv_stream ! ( w, {
111+ ( 12 , self . payment_constraints, required) ,
112+ ( 65536 , self . payment_secret, required)
113+ } ) ;
114+ Ok ( ( ) )
115+ }
116+ }
107117
108118impl < ' a > Writeable for BlindedPaymentTlvsRef < ' a > {
109119 fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , io:: Error > {
0 commit comments