Skip to content

Commit 5499175

Browse files
jkczyzclaude
andcommitted
Bump LDK dependency for splice feerate API refactor
The upstream LDK API moved the min/max feerate parameters from `ChannelManager::splice_channel` to `FundingTemplate::splice_in` and `FundingTemplate::splice_out`. This associates the feerate range with the funding contribution rather than the splice initiation, allowing different feerates per contribution (e.g., for RBF bumps). Update the splice_in_inner and splice_out call sites accordingly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 663864a commit 5499175

File tree

2 files changed

+31
-34
lines changed

2 files changed

+31
-34
lines changed

Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ default = []
3939
#lightning-liquidity = { version = "0.2.0", features = ["std"] }
4040
#lightning-macros = { version = "0.2.0" }
4141

42-
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a", features = ["std"] }
43-
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a" }
44-
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a", features = ["std"] }
45-
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a" }
46-
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a", features = ["tokio"] }
47-
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a" }
48-
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a" }
49-
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a", features = ["rest-client", "rpc-client", "tokio"] }
50-
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
51-
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a", features = ["std"] }
52-
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a" }
42+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6", features = ["std"] }
43+
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6" }
44+
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6", features = ["std"] }
45+
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6" }
46+
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6", features = ["tokio"] }
47+
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6" }
48+
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6" }
49+
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6", features = ["rest-client", "rpc-client", "tokio"] }
50+
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
51+
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6", features = ["std"] }
52+
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6" }
5353

5454
bdk_chain = { version = "0.23.0", default-features = false, features = ["std"] }
5555
bdk_esplora = { version = "0.22.0", default-features = false, features = ["async-https-rustls", "tokio"]}
@@ -79,13 +79,13 @@ async-trait = { version = "0.1", default-features = false }
7979
vss-client = { package = "vss-client-ng", version = "0.5" }
8080
prost = { version = "0.11.6", default-features = false}
8181
#bitcoin-payment-instructions = { version = "0.6" }
82-
bitcoin-payment-instructions = { git = "https://github.com/tankyleo/bitcoin-payment-instructions", branch = "ldk-688544da72cb348e4405d39a75e4d81102c1278a" }
82+
bitcoin-payment-instructions = { git = "https://github.com/jkczyz/bitcoin-payment-instructions", rev = "a7b32d5fded9bb45f73bf82e6d7187adf705171c" }
8383

8484
[target.'cfg(windows)'.dependencies]
8585
winapi = { version = "0.3", features = ["winbase"] }
8686

8787
[dev-dependencies]
88-
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "688544da72cb348e4405d39a75e4d81102c1278a", features = ["std", "_test_utils"] }
88+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "38a62c32454d3eac22578144c479dbf9a6d9bff6", features = ["std", "_test_utils"] }
8989
rand = { version = "0.9.2", default-features = false, features = ["std", "thread_rng", "os_rng"] }
9090
proptest = "1.0.0"
9191
regex = "1.5.6"

src/lib.rs

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,25 +1499,22 @@ impl Node {
14991499

15001500
let funding_template = self
15011501
.channel_manager
1502-
.splice_channel(
1503-
&channel_details.channel_id,
1504-
&counterparty_node_id,
1505-
min_feerate,
1506-
max_feerate,
1507-
)
1502+
.splice_channel(&channel_details.channel_id, &counterparty_node_id)
15081503
.map_err(|e| {
15091504
log_error!(self.logger, "Failed to splice channel: {:?}", e);
15101505
Error::ChannelSplicingFailed
15111506
})?;
15121507

15131508
let contribution = self
15141509
.runtime
1515-
.block_on(
1516-
funding_template
1517-
.splice_in(Amount::from_sat(splice_amount_sats), Arc::clone(&self.wallet)),
1518-
)
1519-
.map_err(|()| {
1520-
log_error!(self.logger, "Failed to splice channel: coin selection failed");
1510+
.block_on(funding_template.splice_in(
1511+
Amount::from_sat(splice_amount_sats),
1512+
min_feerate,
1513+
max_feerate,
1514+
Arc::clone(&self.wallet),
1515+
))
1516+
.map_err(|e| {
1517+
log_error!(self.logger, "Failed to splice channel: {}", e);
15211518
Error::ChannelSplicingFailed
15221519
})?;
15231520

@@ -1615,12 +1612,7 @@ impl Node {
16151612

16161613
let funding_template = self
16171614
.channel_manager
1618-
.splice_channel(
1619-
&channel_details.channel_id,
1620-
&counterparty_node_id,
1621-
min_feerate,
1622-
max_feerate,
1623-
)
1615+
.splice_channel(&channel_details.channel_id, &counterparty_node_id)
16241616
.map_err(|e| {
16251617
log_error!(self.logger, "Failed to splice channel: {:?}", e);
16261618
Error::ChannelSplicingFailed
@@ -1632,9 +1624,14 @@ impl Node {
16321624
}];
16331625
let contribution = self
16341626
.runtime
1635-
.block_on(funding_template.splice_out(outputs, Arc::clone(&self.wallet)))
1636-
.map_err(|()| {
1637-
log_error!(self.logger, "Failed to splice channel: coin selection failed");
1627+
.block_on(funding_template.splice_out(
1628+
outputs,
1629+
min_feerate,
1630+
max_feerate,
1631+
Arc::clone(&self.wallet),
1632+
))
1633+
.map_err(|e| {
1634+
log_error!(self.logger, "Failed to splice channel: {}", e);
16381635
Error::ChannelSplicingFailed
16391636
})?;
16401637

0 commit comments

Comments
 (0)