@@ -27,7 +27,7 @@ use core::ops::Deref;
27
27
28
28
use crate :: lsps2:: msgs:: {
29
29
BuyRequest , BuyResponse , GetInfoRequest , GetInfoResponse , GetVersionsRequest ,
30
- GetVersionsResponse , JITChannelScid , LSPS2Message , LSPS2Request , LSPS2Response ,
30
+ GetVersionsResponse , InterceptScid , LSPS2Message , LSPS2Request , LSPS2Response ,
31
31
OpeningFeeParams ,
32
32
} ;
33
33
@@ -57,7 +57,7 @@ enum InboundJITChannelState {
57
57
MenuRequested { version : u16 } ,
58
58
PendingMenuSelection { version : u16 } ,
59
59
BuyRequested { version : u16 } ,
60
- PendingPayment { client_trusts_lsp : bool , short_channel_id : JITChannelScid } ,
60
+ PendingPayment { client_trusts_lsp : bool , intercept_scid : InterceptScid } ,
61
61
}
62
62
63
63
impl InboundJITChannelState {
@@ -108,11 +108,11 @@ impl InboundJITChannelState {
108
108
}
109
109
110
110
fn invoice_params_received (
111
- & self , client_trusts_lsp : bool , short_channel_id : JITChannelScid ,
111
+ & self , client_trusts_lsp : bool , intercept_scid : InterceptScid ,
112
112
) -> Result < Self , ChannelStateError > {
113
113
match self {
114
114
InboundJITChannelState :: BuyRequested { .. } => {
115
- Ok ( InboundJITChannelState :: PendingPayment { client_trusts_lsp, short_channel_id } )
115
+ Ok ( InboundJITChannelState :: PendingPayment { client_trusts_lsp, intercept_scid } )
116
116
}
117
117
state => Err ( ChannelStateError ( format ! (
118
118
"Invoice params received when JIT Channel was in state: {:?}" ,
@@ -167,9 +167,9 @@ impl InboundJITChannel {
167
167
}
168
168
169
169
fn invoice_params_received (
170
- & mut self , client_trusts_lsp : bool , jit_channel_scid : JITChannelScid ,
170
+ & mut self , client_trusts_lsp : bool , intercept_scid : InterceptScid ,
171
171
) -> Result < ( ) , LightningError > {
172
- self . state = self . state . invoice_params_received ( client_trusts_lsp, jit_channel_scid ) ?;
172
+ self . state = self . state . invoice_params_received ( client_trusts_lsp, intercept_scid ) ?;
173
173
Ok ( ( ) )
174
174
}
175
175
}
@@ -519,17 +519,17 @@ where
519
519
520
520
if let Err ( e) = jit_channel. invoice_params_received (
521
521
result. client_trusts_lsp ,
522
- result. jit_channel_scid . clone ( ) ,
522
+ result. intercept_scid . clone ( ) ,
523
523
) {
524
524
peer_state. remove_inbound_channel ( jit_channel_id) ;
525
525
return Err ( e) ;
526
526
}
527
527
528
- if let Ok ( scid ) = result. jit_channel_scid . to_scid ( ) {
528
+ if let Ok ( intercept_scid ) = result. intercept_scid . to_scid ( ) {
529
529
self . pending_events . enqueue ( Event :: LSPS2Client (
530
530
LSPS2ClientEvent :: InvoiceGenerationReady {
531
531
counterparty_node_id : * counterparty_node_id,
532
- scid ,
532
+ intercept_scid ,
533
533
cltv_expiry_delta : result. lsp_cltv_expiry_delta ,
534
534
payment_size_msat : jit_channel. config . payment_size_msat ,
535
535
client_trusts_lsp : result. client_trusts_lsp ,
@@ -539,8 +539,8 @@ where
539
539
} else {
540
540
return Err ( LightningError {
541
541
err : format ! (
542
- "Received buy response with an invalid scid {:?}" ,
543
- result. jit_channel_scid
542
+ "Received buy response with an invalid intercept scid {:?}" ,
543
+ result. intercept_scid
544
544
) ,
545
545
action : ErrorAction :: IgnoreAndLog ( Level :: Info ) ,
546
546
} ) ;
0 commit comments