File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
lightning-liquidity/src/lsps1 Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -174,12 +174,17 @@ where
174174 & self . config
175175 }
176176
177+ /// Returns whether the peer currently has any active LSPS1 order flows.
178+ ///
179+ /// An order is considered active only after we have validated the client's
180+ /// `CreateOrder` request and replied with a `CreateOrder` response containing
181+ /// an `order_id`.
182+ /// Pending requests that are still awaiting our response are deliberately NOT counted.
177183 pub ( crate ) fn has_active_requests ( & self , counterparty_node_id : & PublicKey ) -> bool {
178184 let outer_state_lock = self . per_peer_state . read ( ) . unwrap ( ) ;
179185 outer_state_lock. get ( counterparty_node_id) . map_or ( false , |inner| {
180186 let peer_state = inner. lock ( ) . unwrap ( ) ;
181- !( peer_state. pending_requests . is_empty ( )
182- && peer_state. outbound_channels_by_order_id . is_empty ( ) )
187+ !peer_state. outbound_channels_by_order_id . is_empty ( )
183188 } )
184189 }
185190
You can’t perform that action at this time.
0 commit comments