@@ -99,8 +99,8 @@ enum GossipSourceConfig {
9999
100100#[ derive( Debug , Clone ) ]
101101struct LiquiditySourceConfig {
102- // LSPS2 service's (address, node_id , token)
103- lsps2_service : Option < ( SocketAddress , PublicKey , Option < String > ) > ,
102+ // LSPS2 service's (node_id, address , token)
103+ lsps2_service : Option < ( PublicKey , SocketAddress , Option < String > ) > ,
104104}
105105
106106impl Default for LiquiditySourceConfig {
@@ -310,14 +310,14 @@ impl NodeBuilder {
310310 ///
311311 /// The given `token` will be used by the LSP to authenticate the user.
312312 pub fn set_liquidity_source_lsps2 (
313- & mut self , address : SocketAddress , node_id : PublicKey , token : Option < String > ,
313+ & mut self , node_id : PublicKey , address : SocketAddress , token : Option < String > ,
314314 ) -> & mut Self {
315315 // Mark the LSP as trusted for 0conf
316316 self . config . trusted_peers_0conf . push ( node_id. clone ( ) ) ;
317317
318318 let liquidity_source_config =
319319 self . liquidity_source_config . get_or_insert ( LiquiditySourceConfig :: default ( ) ) ;
320- liquidity_source_config. lsps2_service = Some ( ( address , node_id , token) ) ;
320+ liquidity_source_config. lsps2_service = Some ( ( node_id , address , token) ) ;
321321 self
322322 }
323323
@@ -644,9 +644,9 @@ impl ArcedNodeBuilder {
644644 ///
645645 /// The given `token` will be used by the LSP to authenticate the user.
646646 pub fn set_liquidity_source_lsps2 (
647- & self , address : SocketAddress , node_id : PublicKey , token : Option < String > ,
647+ & self , node_id : PublicKey , address : SocketAddress , token : Option < String > ,
648648 ) {
649- self . inner . write ( ) . unwrap ( ) . set_liquidity_source_lsps2 ( address , node_id , token) ;
649+ self . inner . write ( ) . unwrap ( ) . set_liquidity_source_lsps2 ( node_id , address , token) ;
650650 }
651651
652652 /// Sets the used storage directory path.
@@ -1125,7 +1125,7 @@ fn build_with_store_internal(
11251125 } ;
11261126
11271127 let liquidity_source = liquidity_source_config. as_ref ( ) . and_then ( |lsc| {
1128- lsc. lsps2_service . as_ref ( ) . map ( |( address , node_id , token) | {
1128+ lsc. lsps2_service . as_ref ( ) . map ( |( node_id , address , token) | {
11291129 let lsps2_client_config = Some ( LSPS2ClientConfig { } ) ;
11301130 let liquidity_client_config =
11311131 Some ( LiquidityClientConfig { lsps1_client_config : None , lsps2_client_config } ) ;
@@ -1138,8 +1138,8 @@ fn build_with_store_internal(
11381138 liquidity_client_config,
11391139 ) ) ;
11401140 Arc :: new ( LiquiditySource :: new_lsps2 (
1141- address. clone ( ) ,
11421141 * node_id,
1142+ address. clone ( ) ,
11431143 token. clone ( ) ,
11441144 Arc :: clone ( & channel_manager) ,
11451145 Arc :: clone ( & keys_manager) ,
0 commit comments