@@ -15,15 +15,15 @@ pub(crate) const LSPS0_LISTPROTOCOLS_METHOD_NAME: &str = "lsps0.list_protocols";
1515/// specification](https://github.com/lightning/blips/blob/master/blip-0050.md#lsps-specification-support-query)
1616/// for more information.
1717#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize , Default ) ]
18- pub struct ListProtocolsRequest { }
18+ pub struct LSPS0ListProtocolsRequest { }
1919
2020/// A response to a `list_protocols` request.
2121///
2222/// Please refer to the [bLIP-50 / LSPS0
2323/// specification](https://github.com/lightning/blips/blob/master/blip-0050.md#lsps-specification-support-query)
2424/// for more information.
2525#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
26- pub struct ListProtocolsResponse {
26+ pub struct LSPS0ListProtocolsResponse {
2727 /// A list of supported protocols.
2828 pub protocols : Vec < u16 > ,
2929}
@@ -36,7 +36,7 @@ pub struct ListProtocolsResponse {
3636#[ derive( Clone , Debug , PartialEq , Eq ) ]
3737pub enum LSPS0Request {
3838 /// A request calling `list_protocols`.
39- ListProtocols ( ListProtocolsRequest ) ,
39+ ListProtocols ( LSPS0ListProtocolsRequest ) ,
4040}
4141
4242impl LSPS0Request {
@@ -56,7 +56,7 @@ impl LSPS0Request {
5656#[ derive( Clone , Debug , PartialEq , Eq ) ]
5757pub enum LSPS0Response {
5858 /// A response to a `list_protocols` request.
59- ListProtocols ( ListProtocolsResponse ) ,
59+ ListProtocols ( LSPS0ListProtocolsResponse ) ,
6060 /// An error response to a `list_protocols` request.
6161 ListProtocolsError ( ResponseError ) ,
6262}
@@ -118,7 +118,7 @@ mod tests {
118118 msg,
119119 LSPSMessage :: LSPS0 ( LSPS0Message :: Request (
120120 RequestId ( "request:id:xyz123" . to_string( ) ) ,
121- LSPS0Request :: ListProtocols ( ListProtocolsRequest { } )
121+ LSPS0Request :: ListProtocols ( LSPS0ListProtocolsRequest { } )
122122 ) )
123123 ) ;
124124 }
@@ -127,7 +127,7 @@ mod tests {
127127 fn serializes_request ( ) {
128128 let request = LSPSMessage :: LSPS0 ( LSPS0Message :: Request (
129129 RequestId ( "request:id:xyz123" . to_string ( ) ) ,
130- LSPS0Request :: ListProtocols ( ListProtocolsRequest { } ) ,
130+ LSPS0Request :: ListProtocols ( LSPS0ListProtocolsRequest { } ) ,
131131 ) ) ;
132132 let json = serde_json:: to_string ( & request) . unwrap ( ) ;
133133 assert_eq ! (
@@ -156,7 +156,9 @@ mod tests {
156156 response,
157157 LSPSMessage :: LSPS0 ( LSPS0Message :: Response (
158158 RequestId ( "request:id:xyz123" . to_string( ) ) ,
159- LSPS0Response :: ListProtocols ( ListProtocolsResponse { protocols: vec![ 1 , 2 , 3 ] } )
159+ LSPS0Response :: ListProtocols ( LSPS0ListProtocolsResponse {
160+ protocols: vec![ 1 , 2 , 3 ]
161+ } )
160162 ) )
161163 ) ;
162164 }
@@ -212,7 +214,7 @@ mod tests {
212214 fn serializes_response ( ) {
213215 let response = LSPSMessage :: LSPS0 ( LSPS0Message :: Response (
214216 RequestId ( "request:id:xyz123" . to_string ( ) ) ,
215- LSPS0Response :: ListProtocols ( ListProtocolsResponse { protocols : vec ! [ 1 , 2 , 3 ] } ) ,
217+ LSPS0Response :: ListProtocols ( LSPS0ListProtocolsResponse { protocols : vec ! [ 1 , 2 , 3 ] } ) ,
216218 ) ) ;
217219 let json = serde_json:: to_string ( & response) . unwrap ( ) ;
218220 assert_eq ! (
0 commit comments