Skip to content

Commit c0f6fb9

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 dead2f3 commit c0f6fb9

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", rev = "654c25c2c1234fadf01adec1554497610f554f09" }
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
@@ -1558,25 +1558,22 @@ impl Node {
15581558

15591559
let funding_template = self
15601560
.channel_manager
1561-
.splice_channel(
1562-
&channel_details.channel_id,
1563-
&counterparty_node_id,
1564-
min_feerate,
1565-
max_feerate,
1566-
)
1561+
.splice_channel(&channel_details.channel_id, &counterparty_node_id)
15671562
.map_err(|e| {
15681563
log_error!(self.logger, "Failed to splice channel: {:?}", e);
15691564
Error::ChannelSplicingFailed
15701565
})?;
15711566

15721567
let contribution = self
15731568
.runtime
1574-
.block_on(
1575-
funding_template
1576-
.splice_in(Amount::from_sat(splice_amount_sats), Arc::clone(&self.wallet)),
1577-
)
1578-
.map_err(|()| {
1579-
log_error!(self.logger, "Failed to splice channel: coin selection failed");
1569+
.block_on(funding_template.splice_in(
1570+
Amount::from_sat(splice_amount_sats),
1571+
min_feerate,
1572+
max_feerate,
1573+
Arc::clone(&self.wallet),
1574+
))
1575+
.map_err(|e| {
1576+
log_error!(self.logger, "Failed to splice channel: {}", e);
15801577
Error::ChannelSplicingFailed
15811578
})?;
15821579

@@ -1674,12 +1671,7 @@ impl Node {
16741671

16751672
let funding_template = self
16761673
.channel_manager
1677-
.splice_channel(
1678-
&channel_details.channel_id,
1679-
&counterparty_node_id,
1680-
min_feerate,
1681-
max_feerate,
1682-
)
1674+
.splice_channel(&channel_details.channel_id, &counterparty_node_id)
16831675
.map_err(|e| {
16841676
log_error!(self.logger, "Failed to splice channel: {:?}", e);
16851677
Error::ChannelSplicingFailed
@@ -1691,9 +1683,14 @@ impl Node {
16911683
}];
16921684
let contribution = self
16931685
.runtime
1694-
.block_on(funding_template.splice_out(outputs, Arc::clone(&self.wallet)))
1695-
.map_err(|()| {
1696-
log_error!(self.logger, "Failed to splice channel: coin selection failed");
1686+
.block_on(funding_template.splice_out(
1687+
outputs,
1688+
min_feerate,
1689+
max_feerate,
1690+
Arc::clone(&self.wallet),
1691+
))
1692+
.map_err(|e| {
1693+
log_error!(self.logger, "Failed to splice channel: {}", e);
16971694
Error::ChannelSplicingFailed
16981695
})?;
16991696

0 commit comments

Comments
 (0)