Skip to content

Commit 452303b

Browse files
committed
Bump rust-lightning to 4991205
1 parent 804f00f commit 452303b

File tree

6 files changed

+35
-31
lines changed

6 files changed

+35
-31
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 = "98393b3de3d8aec897e9ab783cb2418da504e204", features = ["std"] }
43-
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204" }
44-
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204", features = ["std"] }
45-
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204" }
46-
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204", features = ["tokio"] }
47-
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204" }
48-
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204" }
49-
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204", features = ["rest-client", "rpc-client", "tokio"] }
50-
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
51-
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204", features = ["std"] }
52-
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204" }
42+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953", features = ["std"] }
43+
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953" }
44+
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953", features = ["std"] }
45+
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953" }
46+
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953", features = ["tokio"] }
47+
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953" }
48+
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953" }
49+
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953", features = ["rest-client", "rpc-client", "tokio"] }
50+
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
51+
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953", features = ["std"] }
52+
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953" }
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/jkczyz/bitcoin-payment-instructions", rev = "0138feb7acefb1e49102a6fb46d7b776bf43265e" }
82+
bitcoin-payment-instructions = { git = "https://github.com/joostjager/bitcoin-payment-instructions", rev = "7328bd3825887a02a99ce557368a4ba76adcbc0d" }
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 = "98393b3de3d8aec897e9ab783cb2418da504e204", features = ["std", "_test_utils"] }
88+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "49912057895ddfbd69d503de67c80d5576c09953", 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/builder.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,6 @@ fn build_with_store_internal(
17251725
Arc::clone(&wallet),
17261726
Arc::clone(&channel_manager),
17271727
Arc::clone(&keys_manager),
1728-
Arc::clone(&chain_source),
17291728
Arc::clone(&tx_broadcaster),
17301729
Arc::clone(&kv_store),
17311730
Arc::clone(&config),

src/event.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,17 +1306,20 @@ where
13061306
}
13071307
},
13081308
LdkEvent::PaymentForwarded {
1309-
prev_channel_id,
1310-
next_channel_id,
1311-
prev_user_channel_id,
1312-
next_user_channel_id,
1313-
prev_node_id,
1314-
next_node_id,
1309+
prev_htlcs,
1310+
next_htlcs,
13151311
total_fee_earned_msat,
13161312
skimmed_fee_msat,
13171313
claim_from_onchain_tx,
13181314
outbound_amount_forwarded_msat,
13191315
} => {
1316+
let prev_channel_id = prev_htlcs.first().map(|h| h.channel_id);
1317+
let next_channel_id = next_htlcs.first().map(|h| h.channel_id);
1318+
let prev_user_channel_id = prev_htlcs.first().and_then(|h| h.user_channel_id);
1319+
let next_user_channel_id = next_htlcs.first().and_then(|h| h.user_channel_id);
1320+
let prev_node_id = prev_htlcs.first().and_then(|h| h.node_id);
1321+
let next_node_id = next_htlcs.first().and_then(|h| h.node_id);
1322+
13201323
{
13211324
let read_only_network_graph = self.network_graph.read_only();
13221325
let nodes = read_only_network_graph.nodes();
@@ -1384,8 +1387,10 @@ where
13841387
}
13851388

13861389
let event = Event::PaymentForwarded {
1387-
prev_channel_id: prev_channel_id.expect("prev_channel_id expected for events generated by LDK versions greater than 0.0.107."),
1388-
next_channel_id: next_channel_id.expect("next_channel_id expected for events generated by LDK versions greater than 0.0.107."),
1390+
prev_channel_id: prev_channel_id
1391+
.expect("prev_channel_id expected for PaymentForwarded events"),
1392+
next_channel_id: next_channel_id
1393+
.expect("next_channel_id expected for PaymentForwarded events"),
13891394
prev_user_channel_id: prev_user_channel_id.map(UserChannelId),
13901395
next_user_channel_id: next_user_channel_id.map(UserChannelId),
13911396
prev_node_id,

src/liquidity.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ use lightning_types::payment::PaymentHash;
3939
use tokio::sync::oneshot;
4040

4141
use crate::builder::BuildError;
42-
use crate::chain::ChainSource;
4342
use crate::connection::ConnectionManager;
4443
use crate::logger::{log_debug, log_error, log_info, LdkLogger, Logger};
4544
use crate::runtime::Runtime;
@@ -155,7 +154,6 @@ where
155154
wallet: Arc<Wallet>,
156155
channel_manager: Arc<ChannelManager>,
157156
keys_manager: Arc<KeysManager>,
158-
chain_source: Arc<ChainSource>,
159157
tx_broadcaster: Arc<Broadcaster>,
160158
kv_store: Arc<DynStore>,
161159
config: Arc<Config>,
@@ -168,8 +166,7 @@ where
168166
{
169167
pub(crate) fn new(
170168
wallet: Arc<Wallet>, channel_manager: Arc<ChannelManager>, keys_manager: Arc<KeysManager>,
171-
chain_source: Arc<ChainSource>, tx_broadcaster: Arc<Broadcaster>, kv_store: Arc<DynStore>,
172-
config: Arc<Config>, logger: L,
169+
tx_broadcaster: Arc<Broadcaster>, kv_store: Arc<DynStore>, config: Arc<Config>, logger: L,
173170
) -> Self {
174171
let lsps1_client = None;
175172
let lsps2_client = None;
@@ -181,7 +178,6 @@ where
181178
wallet,
182179
channel_manager,
183180
keys_manager,
184-
chain_source,
185181
tx_broadcaster,
186182
kv_store,
187183
config,
@@ -239,7 +235,12 @@ where
239235
let lsps2_service_config = Some(s.ldk_service_config.clone());
240236
let lsps5_service_config = None;
241237
let advertise_service = s.service_config.advertise_service;
242-
LiquidityServiceConfig { lsps2_service_config, lsps5_service_config, advertise_service }
238+
LiquidityServiceConfig {
239+
lsps1_service_config: None,
240+
lsps2_service_config,
241+
lsps5_service_config,
242+
advertise_service,
243+
}
243244
});
244245

245246
let lsps1_client_config = self.lsps1_client.as_ref().map(|s| s.ldk_client_config.clone());
@@ -256,8 +257,6 @@ where
256257
Arc::clone(&self.keys_manager),
257258
Arc::clone(&self.keys_manager),
258259
Arc::clone(&self.channel_manager),
259-
Some(Arc::clone(&self.chain_source)),
260-
None,
261260
Arc::clone(&self.kv_store),
262261
Arc::clone(&self.tx_broadcaster),
263262
liquidity_service_config,

src/payment/unified.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ impl UnifiedPayment {
229229
PaymentMethod::LightningBolt12(_) => 0,
230230
PaymentMethod::LightningBolt11(_) => 1,
231231
PaymentMethod::OnChain(_) => 2,
232+
PaymentMethod::Cashu(_) => 3,
232233
});
233234

234235
for method in sorted_payment_methods {
@@ -282,6 +283,7 @@ impl UnifiedPayment {
282283
let txid = self.onchain_payment.send_to_address(&address, amt_sats, None)?;
283284
return Ok(UnifiedPaymentResult::Onchain { txid });
284285
},
286+
PaymentMethod::Cashu(_) => continue,
285287
}
286288
}
287289

src/types.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ pub(crate) type LiquidityManager = lightning_liquidity::LiquidityManager<
231231
Arc<KeysManager>,
232232
Arc<KeysManager>,
233233
Arc<ChannelManager>,
234-
Arc<ChainSource>,
235234
Arc<DynStore>,
236235
DefaultTimeProvider,
237236
Arc<Broadcaster>,

0 commit comments

Comments
 (0)