Skip to content

Commit c315e8c

Browse files
Fernando Ledesmaamackillop
authored andcommitted
use new rust-lightning version
1 parent 21d17ed commit c315e8c

File tree

3 files changed

+34
-18
lines changed

3 files changed

+34
-18
lines changed

Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ default = []
4242
# lightning-macros = { version = "0.2.0" }
4343

4444
# Branch: https://github.com/moneydevkit/rust-lightning/commits/lsp-0.2.0/
45-
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891", features = ["std"] }
46-
lightning-types = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891" }
47-
lightning-invoice = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891", features = ["std"] }
48-
lightning-net-tokio = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891" }
49-
lightning-persister = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891", features = ["tokio"] }
50-
lightning-background-processor = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891" }
51-
lightning-rapid-gossip-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891" }
52-
lightning-block-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891", features = ["rest-client", "rpc-client", "tokio"] }
53-
lightning-transaction-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
54-
lightning-liquidity = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891", features = ["std"] }
55-
lightning-macros = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891" }
45+
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["std"] }
46+
lightning-types = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a" }
47+
lightning-invoice = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["std"] }
48+
lightning-net-tokio = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a" }
49+
lightning-persister = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["tokio"] }
50+
lightning-background-processor = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a" }
51+
lightning-rapid-gossip-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a" }
52+
lightning-block-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["rest-client", "rpc-client", "tokio"] }
53+
lightning-transaction-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
54+
lightning-liquidity = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["std"] }
55+
lightning-macros = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a" }
5656

5757
#lightning = { path = "../rust-lightning/lightning", features = ["std"] }
5858
#lightning-types = { path = "../rust-lightning/lightning-types" }
@@ -99,7 +99,7 @@ winapi = { version = "0.3", features = ["winbase"] }
9999
[dev-dependencies]
100100
# lightning = { version = "0.2.0", features = ["std", "_test_utils"] }
101101
# Branch: https://github.com/moneydevkit/rust-lightning/commits/lsp-0.2.0/
102-
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "f1ac8f14a1de542a08d02bd2132d31da216ce891", features = ["std", "_test_utils"] }
102+
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["std", "_test_utils"] }
103103
#lightning = { path = "../rust-lightning/lightning", features = ["std", "_test_utils"] }
104104
proptest = "1.0.0"
105105
regex = "1.5.6"

src/builder.rs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,15 +1534,33 @@ fn build_with_store_internal(
15341534
let is_lsp_client = liquidity_source_config
15351535
.map(|lsc| lsc.lsps2_client.is_some() || lsc.lsps4_client.is_some())
15361536
.unwrap_or(false);
1537+
let is_lsp_service = liquidity_source_config
1538+
.map(|lsc| lsc.lsps2_service.is_some() || lsc.lsps4_service.is_some())
1539+
.unwrap_or(false);
1540+
15371541
if is_lsp_client {
1538-
// If we act as an LSPS2 service, we need to to be able to intercept HTLCs and forward the
1542+
// If we act as an LSPS2/LSPS4 client, we need to be able to intercept HTLCs and forward the
1543+
// information to the service handler.
1544+
user_config.accept_intercept_htlcs = true;
1545+
1546+
// If we act as an LSPS2/LSPS4 client, we allow forwarding to unnannounced channels.
1547+
user_config.accept_forwards_to_priv_channels = true;
1548+
1549+
// If we act as an LSPS2/LSPS4 client, set the HTLC-value-in-flight to 100% of the channel value
1550+
// to ensure we can forward the initial payment.
1551+
user_config.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel =
1552+
100;
1553+
}
1554+
1555+
if is_lsp_service {
1556+
// If we act as an LSPS2/LSPS4 service, we need to be able to intercept HTLCs and forward the
15391557
// information to the service handler.
15401558
user_config.accept_intercept_htlcs = true;
15411559

1542-
// If we act as an LSPS2 service, we allow forwarding to unnannounced channels.
1560+
// If we act as an LSPS2/LSPS4 service, we allow forwarding to unannounced channels.
15431561
user_config.accept_forwards_to_priv_channels = true;
15441562

1545-
// If we act as an LSPS2 service, set the HTLC-value-in-flight to 100% of the channel value
1563+
// If we act as an LSPS2/LSPS4 service, set the HTLC-value-in-flight to 100% of the channel value
15461564
// to ensure we can forward the initial payment.
15471565
user_config.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel =
15481566
100;

src/liquidity.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,6 @@ where
17581758
if let Some(lsps4_service_handler) = self.liquidity_manager.lsps4_service_handler() {
17591759
if let Err(e) = lsps4_service_handler
17601760
.channel_ready(counterparty_node_id)
1761-
.await
17621761
{
17631762
log_error!(
17641763
self.logger,
@@ -1797,8 +1796,7 @@ where
17971796
intercept_id,
17981797
expected_outbound_amount_msat,
17991798
payment_hash,
1800-
)
1801-
.await
1799+
)
18021800
{
18031801
log_error!(
18041802
self.logger,

0 commit comments

Comments
 (0)