@@ -89,17 +89,27 @@ pub struct PaymentConstraints {
8989 pub htlc_minimum_msat : u64 ,
9090}
9191
92- impl_writeable_tlv_based ! ( ForwardTlvs , {
93- ( 2 , short_channel_id, required) ,
94- ( 10 , payment_relay, required) ,
95- ( 12 , payment_constraints, required) ,
96- ( 14 , features, required) ,
97- } ) ;
92+ impl Writeable for ForwardTlvs {
93+ fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , io:: Error > {
94+ encode_tlv_stream ! ( w, {
95+ ( 2 , self . short_channel_id, required) ,
96+ ( 10 , self . payment_relay, required) ,
97+ ( 12 , self . payment_constraints, required) ,
98+ ( 14 , self . features, required)
99+ } ) ;
100+ Ok ( ( ) )
101+ }
102+ }
98103
99- impl_writeable_tlv_based ! ( ReceiveTlvs , {
100- ( 12 , payment_constraints, required) ,
101- ( 65536 , payment_secret, required) ,
102- } ) ;
104+ impl Writeable for ReceiveTlvs {
105+ fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , io:: Error > {
106+ encode_tlv_stream ! ( w, {
107+ ( 12 , self . payment_constraints, required) ,
108+ ( 65536 , self . payment_secret, required)
109+ } ) ;
110+ Ok ( ( ) )
111+ }
112+ }
103113
104114impl < ' a > Writeable for BlindedPaymentTlvsRef < ' a > {
105115 fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , io:: Error > {
0 commit comments