Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@ uniffi-default = [
#lightning-macros = { version = "0.2.0" }
#lightning-dns-resolver = { version = "0.3.0" }

lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5", features = ["std"] }
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5" }
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5", features = ["std"] }
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5" }
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5", features = ["tokio"], optional = true }
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5" }
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5" }
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5", features = ["rest-client", "rpc-client", "tokio"], optional = true }
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5", optional = true }
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5", features = ["std"] }
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5" }
lightning-dns-resolver = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5", optional = true }
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047", features = ["std"] }
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047" }
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047", features = ["std"] }
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047" }
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047", features = ["tokio"], optional = true }
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047" }
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047" }
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047", features = ["rest-client", "rpc-client", "tokio"], optional = true }
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047", optional = true }
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047", features = ["std"] }
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047" }
lightning-dns-resolver = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047", optional = true }

bdk_chain = { version = "0.23.3", default-features = false, features = ["std"] }
bdk_esplora = { version = "0.22.2", default-features = false, features = ["async-https-rustls", "tokio"], optional = true }
Expand Down Expand Up @@ -132,14 +132,14 @@ postgres-native-tls = { version = "0.5", default-features = false, features = ["
vss-client = { package = "vss-client-ng", version = "0.6", optional = true }
prost = { version = "0.11.6", default-features = false, optional = true}
#bitcoin-payment-instructions = { version = "0.6" }
bitcoin-payment-instructions = { git = "https://github.com/benthecarman/bitcoin-payment-instructions", rev = "3dbe11bdf8916639df42476501fb40f87b253e84", optional = true }
bitcoin-payment-instructions = { git = "https://github.com/benthecarman/bitcoin-payment-instructions", rev = "4e98947d9589f93b55c382e6d4393b8a6f18d600", optional = true }

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

[dev-dependencies]
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5", features = ["std", "_test_utils"] }
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "d7a980641c6325ddda5072a0f470ef8392676cf5", features = ["tokio"] }
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047", features = ["std", "_test_utils"] }
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "ade399078c4826649174eb9053b8a3d1a19be047", features = ["tokio"] }
rand = { version = "0.9.2", default-features = false, features = ["std", "thread_rng", "os_rng"] }
proptest = "1.0.0"
regex = "1.5.6"
Expand Down
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,7 @@ impl From<ChannelConfig> for LdkChannelConfig {
max_dust_htlc_exposure: value.max_dust_htlc_exposure.into(),
force_close_avoidance_max_fee_satoshis: value.force_close_avoidance_max_fee_satoshis,
accept_underpaying_htlcs: value.accept_underpaying_htlcs,
..LdkChannelConfig::default()
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions src/liquidity/service/lsps2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ where
opening_fee_msat: _,
user_channel_id,
intercept_scid: _,
max_client_to_self_delay,
} => {
if self.liquidity_manager.lsps2_service_handler().is_none() {
log_error!(self.logger, "Failed to handle LSPS2ServiceEvent as LSPS2 liquidity service was not configured.",);
Expand Down Expand Up @@ -492,6 +493,15 @@ where
config.channel_config.forwarding_fee_base_msat = 0;
config.channel_config.forwarding_fee_proportional_millionths = 0;

// Ensure the client's `to_self_delay` doesn't exceed the limit agreed upon in the
// selected opening fee parameters. Events persisted before the limit was carried
// in the event fall back to our currently configured limit.
let max_client_to_self_delay =
max_client_to_self_delay.unwrap_or(service_config.max_client_to_self_delay);
let their_to_self_delay = &mut config.channel_handshake_limits.their_to_self_delay;
*their_to_self_delay =
(*their_to_self_delay as u32).min(max_client_to_self_delay) as u16;

let result = if service_config.disable_client_reserve {
self.channel_manager.create_channel_to_trusted_peer_0reserve(
their_network_key,
Expand Down
Loading