Skip to content

Commit 4eb87c1

Browse files
committed
Load chan mgr from monitors
1 parent d4d0879 commit 4eb87c1

14 files changed

+190
-165
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7180,6 +7180,7 @@ mod tests {
71807180
check_added_monitors(&nodes[1], 1);
71817181
}
71827182

7183+
#[cfg(not(feature = "safe_channels"))]
71837184
#[test]
71847185
fn test_funding_spend_refuses_updates() {
71857186
do_test_funding_spend_refuses_updates(true);

lightning/src/ln/chanmon_update_fail_tests.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2840,6 +2840,8 @@ fn do_channel_holding_cell_serialize(disconnect: bool, reload_a: bool) {
28402840
claim_payment(&nodes[0], &[&nodes[1]], payment_preimage_1);
28412841
claim_payment(&nodes[0], &[&nodes[1]], payment_preimage_2);
28422842
}
2843+
2844+
#[cfg(not(feature = "safe_channels"))]
28432845
#[test]
28442846
fn channel_holding_cell_serialize() {
28452847
do_channel_holding_cell_serialize(true, true);
@@ -3313,6 +3315,7 @@ fn do_test_outbound_reload_without_init_mon(use_0conf: bool) {
33133315
assert!(nodes[0].node.list_channels().is_empty());
33143316
}
33153317

3318+
#[cfg(not(feature = "safe_channels"))]
33163319
#[test]
33173320
fn test_outbound_reload_without_init_mon() {
33183321
do_test_outbound_reload_without_init_mon(true);
@@ -3421,6 +3424,7 @@ fn do_test_inbound_reload_without_init_mon(use_0conf: bool, lock_commitment: boo
34213424
assert!(nodes[1].node.list_channels().is_empty());
34223425
}
34233426

3427+
#[cfg(not(feature = "safe_channels"))]
34243428
#[test]
34253429
fn test_inbound_reload_without_init_mon() {
34263430
do_test_inbound_reload_without_init_mon(true, true);
@@ -3570,6 +3574,7 @@ fn do_test_blocked_chan_preimage_release(completion_mode: BlockedUpdateComplMode
35703574
expect_payment_sent(&nodes[2], payment_preimage_2, None, true, true);
35713575
}
35723576

3577+
#[cfg(not(feature = "safe_channels"))]
35733578
#[test]
35743579
fn test_blocked_chan_preimage_release() {
35753580
do_test_blocked_chan_preimage_release(BlockedUpdateComplMode::AtReload);
@@ -3760,6 +3765,7 @@ fn do_test_inverted_mon_completion_order(
37603765
expect_payment_sent(&nodes[0], payment_preimage, None, true, true);
37613766
}
37623767

3768+
#[cfg(not(feature = "safe_channels"))]
37633769
#[test]
37643770
fn test_inverted_mon_completion_order() {
37653771
do_test_inverted_mon_completion_order(true, true);
@@ -3962,6 +3968,7 @@ fn do_test_durable_preimages_on_closed_channel(
39623968
}
39633969
}
39643970

3971+
#[cfg(not(feature = "safe_channels"))]
39653972
#[test]
39663973
fn test_durable_preimages_on_closed_channel() {
39673974
do_test_durable_preimages_on_closed_channel(true, true, true);
@@ -4086,6 +4093,7 @@ fn do_test_reload_mon_update_completion_actions(close_during_reload: bool) {
40864093
send_payment(&nodes[1], &[&nodes[2]], 100_000);
40874094
}
40884095

4096+
#[cfg(not(feature = "safe_channels"))]
40894097
#[test]
40904098
fn test_reload_mon_update_completion_actions() {
40914099
do_test_reload_mon_update_completion_actions(true);
@@ -4454,6 +4462,7 @@ fn do_test_partial_claim_mon_update_compl_actions(reload_a: bool, reload_b: bool
44544462
assert!(!get_monitor!(nodes[3], chan_4_id).get_stored_preimages().contains_key(&payment_hash));
44554463
}
44564464

4465+
#[cfg(not(feature = "safe_channels"))]
44574466
#[test]
44584467
fn test_partial_claim_mon_update_compl_actions() {
44594468
do_test_partial_claim_mon_update_compl_actions(true, true);

lightning/src/ln/channel_open_tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,6 +2095,7 @@ pub fn test_batch_channel_open() {
20952095
)));
20962096
}
20972097

2098+
#[cfg(not(feature = "safe_channels"))]
20982099
#[xtest(feature = "_externalize_tests")]
20992100
pub fn test_close_in_funding_batch() {
21002101
// This test ensures that if one of the channels
@@ -2183,6 +2184,7 @@ pub fn test_close_in_funding_batch() {
21832184
assert!(nodes[0].node.list_channels().is_empty());
21842185
}
21852186

2187+
#[cfg(not(feature = "safe_channels"))]
21862188
#[xtest(feature = "_externalize_tests")]
21872189
pub fn test_batch_funding_close_after_funding_signed() {
21882190
let chanmon_cfgs = create_chanmon_cfgs(3);

0 commit comments

Comments
 (0)