Skip to content

Commit 0a36d7f

Browse files
authored
Merge pull request #720 from tnull/2025-11-fix-check-closed-event
Account for `check_closed_event` being moved on LDK `main`
2 parents 451afe5 + 9968684 commit 0a36d7f

File tree

2 files changed

+33
-20
lines changed

2 files changed

+33
-20
lines changed

Cargo.toml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,29 @@ panic = 'abort' # Abort on panic
2727
default = []
2828

2929
[dependencies]
30-
lightning = { version = "0.2.0-rc1", features = ["std"] }
31-
lightning-types = { version = "0.3.0-rc1" }
32-
lightning-invoice = { version = "0.34.0-rc1", features = ["std"] }
33-
lightning-net-tokio = { version = "0.2.0-rc1" }
34-
lightning-persister = { version = "0.2.0-rc1", features = ["tokio"] }
35-
lightning-background-processor = { version = "0.2.0-rc1" }
36-
lightning-rapid-gossip-sync = { version = "0.2.0-rc1" }
37-
lightning-block-sync = { version = "0.2.0-rc1", features = ["rest-client", "rpc-client", "tokio"] }
38-
lightning-transaction-sync = { version = "0.2.0-rc1", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
39-
lightning-liquidity = { version = "0.2.0-rc1", features = ["std"] }
40-
lightning-macros = { version = "0.2.0-rc1" }
30+
#lightning = { version = "0.2.0-rc1", features = ["std"] }
31+
#lightning-types = { version = "0.3.0-rc1" }
32+
#lightning-invoice = { version = "0.34.0-rc1", features = ["std"] }
33+
#lightning-net-tokio = { version = "0.2.0-rc1" }
34+
#lightning-persister = { version = "0.2.0-rc1", features = ["tokio"] }
35+
#lightning-background-processor = { version = "0.2.0-rc1" }
36+
#lightning-rapid-gossip-sync = { version = "0.2.0-rc1" }
37+
#lightning-block-sync = { version = "0.2.0-rc1", features = ["rest-client", "rpc-client", "tokio"] }
38+
#lightning-transaction-sync = { version = "0.2.0-rc1", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
39+
#lightning-liquidity = { version = "0.2.0-rc1", features = ["std"] }
40+
#lightning-macros = { version = "0.2.0-rc1" }
41+
42+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370", features = ["std"] }
43+
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370" }
44+
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370", features = ["std"] }
45+
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370" }
46+
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370", features = ["tokio"] }
47+
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370" }
48+
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370" }
49+
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370", features = ["rest-client", "rpc-client", "tokio"] }
50+
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
51+
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370", features = ["std"] }
52+
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370" }
4153

4254
bdk_chain = { version = "0.23.0", default-features = false, features = ["std"] }
4355
bdk_esplora = { version = "0.22.0", default-features = false, features = ["async-https-rustls", "tokio"]}
@@ -70,7 +82,7 @@ prost = { version = "0.11.6", default-features = false}
7082
winapi = { version = "0.3", features = ["winbase"] }
7183

7284
[dev-dependencies]
73-
lightning = { version = "0.2.0-rc1", features = ["std", "_test_utils"] }
85+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "bb5504ec62d4b7e9d5626d8b1a6de60d71e8d370", features = ["std", "_test_utils"] }
7486
proptest = "1.0.0"
7587
regex = "1.5.6"
7688
criterion = { version = "0.7.0", features = ["async_tokio"] }

src/io/test_utils.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ use std::sync::Mutex;
1515

1616
use lightning::events::ClosureReason;
1717
use lightning::ln::functional_test_utils::{
18-
connect_block, create_announced_chan_between_nodes, create_chanmon_cfgs, create_dummy_block,
19-
create_network, create_node_cfgs, create_node_chanmgrs, send_payment, TestChanMonCfg,
18+
check_closed_event, connect_block, create_announced_chan_between_nodes, create_chanmon_cfgs,
19+
create_dummy_block, create_network, create_node_cfgs, create_node_chanmgrs, send_payment,
20+
TestChanMonCfg,
2021
};
2122
use lightning::util::persist::{
2223
KVStore, KVStoreSync, MonitorUpdatingPersister, KVSTORE_NAMESPACE_KEY_MAX_LEN,
2324
};
2425
use lightning::util::test_utils;
25-
use lightning::{check_added_monitors, check_closed_broadcast, check_closed_event, io};
26+
use lightning::{check_added_monitors, check_closed_broadcast, io};
2627
use rand::distr::Alphanumeric;
2728
use rand::{rng, Rng};
2829

@@ -326,12 +327,12 @@ pub(crate) fn do_test_store<K: KVStoreSync + Sync>(store_0: &K, store_1: &K) {
326327
message.clone(),
327328
)
328329
.unwrap();
329-
check_closed_event!(
330-
nodes[0],
330+
check_closed_event(
331+
&nodes[0],
331332
1,
332333
ClosureReason::HolderForceClosed { broadcasted_latest_txn: Some(true), message },
333-
[nodes[1].node.get_our_node_id()],
334-
100000
334+
&[nodes[1].node.get_our_node_id()],
335+
100000,
335336
);
336337
check_closed_broadcast!(nodes[0], true);
337338
check_added_monitors!(nodes[0], 1);
@@ -345,7 +346,7 @@ pub(crate) fn do_test_store<K: KVStoreSync + Sync>(store_0: &K, store_1: &K) {
345346
check_closed_broadcast!(nodes[1], true);
346347
let reason = ClosureReason::CommitmentTxConfirmed;
347348
let node_id_0 = nodes[0].node.get_our_node_id();
348-
check_closed_event!(nodes[1], 1, reason, false, [node_id_0], 100000);
349+
check_closed_event(&nodes[1], 1, reason, &[node_id_0], 100000);
349350
check_added_monitors!(nodes[1], 1);
350351

351352
// Make sure everything is persisted as expected after close.

0 commit comments

Comments
 (0)