File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
lightning-liquidity/src/lsps1 Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -174,13 +174,18 @@ where
174
174
& self . config
175
175
}
176
176
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.
177
183
pub ( crate ) fn has_active_requests ( & self , counterparty_node_id : & PublicKey ) -> bool {
178
184
let outer_state_lock = self . per_peer_state . read ( ) . unwrap ( ) ;
179
- outer_state_lock. get ( counterparty_node_id) . map_or ( false , |inner| {
180
- let peer_state = inner. lock ( ) . unwrap ( ) ;
181
- !( peer_state. pending_requests . is_empty ( )
182
- && peer_state. outbound_channels_by_order_id . is_empty ( ) )
183
- } )
185
+ outer_state_lock. get ( counterparty_node_id) . map_or ( false , |inner| {
186
+ let peer_state = inner. lock ( ) . unwrap ( ) ;
187
+ !peer_state. outbound_channels_by_order_id . is_empty ( )
188
+ } )
184
189
}
185
190
186
191
fn handle_get_info_request (
You can’t perform that action at this time.
0 commit comments