Skip to content

Commit c62ca3a

Browse files
committed
Bump rust-lightning revision to 0e7bfa76
Update all `rust-lightning` crate references and patch overrides to `0e7bfa76774d087bac04cbc99e5625e2e17e014f`, the latest commit on branch `2026-03-lsps2-bolt12-alt`. Co-Authored-By: HAL 9000
1 parent 690f71d commit c62ca3a

File tree

5 files changed

+51
-40
lines changed

5 files changed

+51
-40
lines changed

Cargo.toml

Lines changed: 23 additions & 23 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/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7", features = ["std"] }
43-
lightning-types = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
44-
lightning-invoice = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7", features = ["std"] }
45-
lightning-net-tokio = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
46-
lightning-persister = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7", features = ["tokio"] }
47-
lightning-background-processor = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
48-
lightning-rapid-gossip-sync = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
49-
lightning-block-sync = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7", features = ["rest-client", "rpc-client", "tokio"] }
50-
lightning-transaction-sync = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
51-
lightning-liquidity = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7", features = ["std"] }
52-
lightning-macros = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
42+
lightning = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3", features = ["std"] }
43+
lightning-types = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
44+
lightning-invoice = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3", features = ["std"] }
45+
lightning-net-tokio = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
46+
lightning-persister = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3", features = ["tokio"] }
47+
lightning-background-processor = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
48+
lightning-rapid-gossip-sync = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
49+
lightning-block-sync = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3", features = ["rest-client", "rpc-client", "tokio"] }
50+
lightning-transaction-sync = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
51+
lightning-liquidity = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3", features = ["std"] }
52+
lightning-macros = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
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"]}
@@ -85,7 +85,7 @@ bitcoin-payment-instructions = { git = "https://github.com/jkczyz/bitcoin-paymen
8585
winapi = { version = "0.3", features = ["winbase"] }
8686

8787
[dev-dependencies]
88-
lightning = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7", features = ["std", "_test_utils"] }
88+
lightning = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3", 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"
@@ -172,14 +172,14 @@ harness = false
172172
#vss-client-ng = { git = "https://github.com/lightningdevkit/vss-client", branch = "main" }
173173
#
174174
[patch."https://github.com/lightningdevkit/rust-lightning"]
175-
lightning = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
176-
lightning-types = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
177-
lightning-invoice = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
178-
lightning-net-tokio = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
179-
lightning-persister = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
180-
lightning-background-processor = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
181-
lightning-rapid-gossip-sync = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
182-
lightning-block-sync = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
183-
lightning-transaction-sync = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
184-
lightning-liquidity = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
185-
lightning-macros = { git = "https://github.com/tnull/rust-lightning", rev = "ed27564855b399b5eecd59f2547d667d6f48c4f7" }
175+
lightning = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
176+
lightning-types = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
177+
lightning-invoice = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
178+
lightning-net-tokio = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
179+
lightning-persister = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
180+
lightning-background-processor = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
181+
lightning-rapid-gossip-sync = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
182+
lightning-block-sync = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
183+
lightning-transaction-sync = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
184+
lightning-liquidity = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }
185+
lightning-macros = { git = "https://github.com/tnull/rust-lightning", rev = "98a9e9d56dd482ad04552dbf3a7d57e91f94aad3" }

src/builder.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ use crate::runtime::{Runtime, RuntimeSpawner};
7878
use crate::tx_broadcaster::TransactionBroadcaster;
7979
use crate::types::{
8080
AsyncPersister, ChainMonitor, ChannelManager, DynStore, DynStoreWrapper, GossipSync, Graph,
81-
KeysManager, MessageRouter, OnionMessenger, PaymentStore, PeerManager, PendingPaymentStore,
82-
Persister, SyncAndAsyncKVStore,
81+
InnerMessageRouter, KeysManager, MessageRouter, OnionMessenger, PaymentStore, PeerManager,
82+
PendingPaymentStore, Persister, SyncAndAsyncKVStore,
8383
};
8484
use crate::wallet::persist::KVStoreWalletPersister;
8585
use crate::wallet::Wallet;
@@ -1548,6 +1548,7 @@ fn build_with_store_internal(
15481548
Arc::clone(&persister),
15491549
Arc::clone(&keys_manager),
15501550
peer_storage_key,
1551+
false,
15511552
));
15521553

15531554
// Initialize the network graph, scorer, and router
@@ -1635,7 +1636,13 @@ fn build_with_store_internal(
16351636
Arc::clone(&scorer),
16361637
scoring_fee_params,
16371638
);
1638-
let router = Arc::new(LSPS2BOLT12Router::new(inner_router, Arc::clone(&keys_manager)));
1639+
let inner_message_router =
1640+
InnerMessageRouter::new(Arc::clone(&network_graph), Arc::clone(&keys_manager));
1641+
let router = Arc::new(LSPS2BOLT12Router::new(
1642+
inner_router,
1643+
inner_message_router,
1644+
Arc::clone(&keys_manager),
1645+
));
16391646

16401647
let mut user_config = default_user_config(&config);
16411648

@@ -1663,8 +1670,7 @@ fn build_with_store_internal(
16631670
}
16641671
}
16651672

1666-
let message_router =
1667-
Arc::new(MessageRouter::new(Arc::clone(&network_graph), Arc::clone(&keys_manager)));
1673+
let message_router = Arc::clone(&router);
16681674

16691675
// Initialize the ChannelManager
16701676
let channel_manager = {

src/event.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,17 +1306,19 @@ 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);
13201322
{
13211323
let read_only_network_graph = self.network_graph.read_only();
13221324
let nodes = read_only_network_graph.nodes();

src/liquidity.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,12 @@ where
249249
let lsps2_service_config = Some(s.ldk_service_config.clone());
250250
let lsps5_service_config = None;
251251
let advertise_service = s.service_config.advertise_service;
252-
LiquidityServiceConfig { lsps2_service_config, lsps5_service_config, advertise_service }
252+
LiquidityServiceConfig {
253+
lsps1_service_config: None,
254+
lsps2_service_config,
255+
lsps5_service_config,
256+
advertise_service,
257+
}
253258
});
254259

255260
let lsps1_client_config = self.lsps1_client.as_ref().map(|s| s.ldk_client_config.clone());
@@ -266,8 +271,6 @@ where
266271
Arc::clone(&self.keys_manager),
267272
Arc::clone(&self.keys_manager),
268273
Arc::clone(&self.channel_manager),
269-
Some(Arc::clone(&self.chain_source)),
270-
None,
271274
Arc::clone(&self.kv_store),
272275
Arc::clone(&self.tx_broadcaster),
273276
liquidity_service_config,

src/types.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ pub(crate) type LiquidityManager = lightning_liquidity::LiquidityManager<
232232
Arc<KeysManager>,
233233
Arc<KeysManager>,
234234
Arc<ChannelManager>,
235-
Arc<ChainSource>,
236235
Arc<DynStore>,
237236
DefaultTimeProvider,
238237
Arc<Broadcaster>,
@@ -263,7 +262,7 @@ pub(crate) type InnerRouter = DefaultRouter<
263262
ProbabilisticScoringFeeParameters,
264263
Scorer,
265264
>;
266-
pub(crate) type Router = LSPS2BOLT12Router<InnerRouter, Arc<KeysManager>>;
265+
pub(crate) type Router = LSPS2BOLT12Router<InnerRouter, InnerMessageRouter, Arc<KeysManager>>;
267266
pub(crate) type Scorer = CombinedScorer<Arc<Graph>, Arc<Logger>>;
268267

269268
pub(crate) type Graph = gossip::NetworkGraph<Arc<Logger>>;
@@ -297,11 +296,12 @@ pub(crate) type OnionMessenger = lightning::onion_message::messenger::OnionMesse
297296

298297
pub(crate) type HRNResolver = LDKOnionMessageDNSSECHrnResolver<Arc<Graph>, Arc<Logger>>;
299298

300-
pub(crate) type MessageRouter = lightning::onion_message::messenger::DefaultMessageRouter<
299+
pub(crate) type InnerMessageRouter = lightning::onion_message::messenger::DefaultMessageRouter<
301300
Arc<Graph>,
302301
Arc<Logger>,
303302
Arc<KeysManager>,
304303
>;
304+
pub(crate) type MessageRouter = Router;
305305

306306
pub(crate) type Sweeper = OutputSweeper<
307307
Arc<Broadcaster>,

0 commit comments

Comments
 (0)