Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit b18d635

Browse files
committed
Rename BuyResponse::intercept_scid to jit_channel_scid
Previously, during a cleanup, we accidentally also renamed the actual `BuyResponse` field, not only our internal variables. Here, we fix this regression to reestablish compliance with the spec.
1 parent f55c6f2 commit b18d635

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/lsps2/client.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ where
269269
action: ErrorAction::IgnoreAndLog(Level::Info),
270270
})?;
271271

272-
if let Ok(intercept_scid) = result.intercept_scid.to_scid() {
272+
if let Ok(intercept_scid) = result.jit_channel_scid.to_scid() {
273273
self.pending_events.enqueue(Event::LSPS2Client(
274274
LSPS2ClientEvent::InvoiceParametersReady {
275275
request_id,
@@ -283,7 +283,7 @@ where
283283
return Err(LightningError {
284284
err: format!(
285285
"Received buy response with an invalid intercept scid {:?}",
286-
result.intercept_scid
286+
result.jit_channel_scid
287287
),
288288
action: ErrorAction::IgnoreAndLog(Level::Info),
289289
});

src/lsps2/msgs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl InterceptScid {
150150
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
151151
pub struct BuyResponse {
152152
/// The intercept short channel id used by LSP to identify need to open channel.
153-
pub intercept_scid: InterceptScid,
153+
pub jit_channel_scid: InterceptScid,
154154
/// The locktime expiry delta the lsp requires.
155155
pub lsp_cltv_expiry_delta: u32,
156156
/// A flag that indicates who is trusting who.

src/lsps2/service.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ where
639639
.insert_outbound_channel(intercept_scid, outbound_jit_channel);
640640

641641
let response = LSPS2Response::Buy(BuyResponse {
642-
intercept_scid: intercept_scid.into(),
642+
jit_channel_scid: intercept_scid.into(),
643643
lsp_cltv_expiry_delta: cltv_expiry_delta,
644644
client_trusts_lsp,
645645
});

0 commit comments

Comments
 (0)