Skip to content

Commit 330fdf0

Browse files
jkczyzclaude
andcommitted
Adopt LDK's ConfirmedUtxo in splice coin selection
LDK dropped the `FundingTxInput` type alias in favor of using `ConfirmedUtxo` directly across the funding API. Switch over our splice coin-selection path that built the input list via `FundingTxInput::new_p2wpkh`. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1e2b16c commit 330fdf0

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ default = []
4040
#lightning-macros = { version = "0.2.0" }
4141
#lightning-dns-resolver = { version = "0.3.0" }
4242

43-
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90", features = ["std"] }
44-
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90" }
45-
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90", features = ["std"] }
46-
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90" }
47-
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90", features = ["tokio"] }
48-
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90" }
49-
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90" }
50-
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90", features = ["rest-client", "rpc-client", "tokio"] }
51-
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
52-
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90", features = ["std"] }
53-
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90" }
54-
lightning-dns-resolver = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90" }
43+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a", features = ["std"] }
44+
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a" }
45+
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a", features = ["std"] }
46+
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a" }
47+
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a", features = ["tokio"] }
48+
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a" }
49+
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a" }
50+
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a", features = ["rest-client", "rpc-client", "tokio"] }
51+
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
52+
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a", features = ["std"] }
53+
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a" }
54+
lightning-dns-resolver = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a" }
5555

5656
bdk_chain = { version = "0.23.0", default-features = false, features = ["std"] }
5757
bdk_esplora = { version = "0.22.0", default-features = false, features = ["async-https-rustls", "tokio"]}
@@ -81,13 +81,13 @@ async-trait = { version = "0.1", default-features = false }
8181
vss-client = { package = "vss-client-ng", version = "0.5" }
8282
prost = { version = "0.11.6", default-features = false}
8383
#bitcoin-payment-instructions = { version = "0.6" }
84-
bitcoin-payment-instructions = { git = "https://github.com/jkczyz/bitcoin-payment-instructions", rev = "beeb5d530fc14bb1fc0564dc39ecf57c4a92a53d" }
84+
bitcoin-payment-instructions = { git = "https://github.com/jkczyz/bitcoin-payment-instructions", rev = "c7d7ea849fcbe8cad385c93f8057cd68ecb994b7" }
8585

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

8989
[dev-dependencies]
90-
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "1ab220bfa84c8d2a6198fc5ae305aad82811fc90", features = ["std", "_test_utils"] }
90+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "10608650d455f4d535cbac73921be329d814854a", features = ["std", "_test_utils"] }
9191
rand = { version = "0.9.2", default-features = false, features = ["std", "thread_rng", "os_rng"] }
9292
proptest = "1.0.0"
9393
regex = "1.5.6"

src/wallet/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ use lightning::chain::chaininterface::{
3737
use lightning::chain::channelmonitor::ANTI_REORG_DELAY;
3838
use lightning::chain::{BlockLocator, ClaimId, Listen};
3939
use lightning::ln::channelmanager::PaymentId;
40-
use lightning::ln::funding::FundingTxInput;
4140
use lightning::ln::inbound_payment::ExpandedKey;
4241
use lightning::ln::msgs::UnsignedGossipMessage;
4342
use lightning::ln::script::ShutdownScript;
@@ -46,6 +45,7 @@ use lightning::sign::{
4645
PeerStorageKey, Recipient, SignerProvider, SpendableOutputDescriptor,
4746
};
4847
use lightning::util::message_signing;
48+
use lightning::util::wallet_utils::ConfirmedUtxo;
4949
use lightning::util::wallet_utils::{
5050
CoinSelection, CoinSelectionSource, Input, Utxo, WalletSource,
5151
};
@@ -942,7 +942,7 @@ impl Wallet {
942942
locked_wallet
943943
.tx_details(txin.previous_output.txid)
944944
.map(|tx_details| tx_details.tx.deref().clone())
945-
.map(|prevtx| FundingTxInput::new_p2wpkh(prevtx, txin.previous_output.vout))
945+
.map(|prevtx| ConfirmedUtxo::new_p2wpkh(prevtx, txin.previous_output.vout))
946946
})
947947
.collect::<Result<Vec<_>, ()>>()?;
948948

0 commit comments

Comments
 (0)