@@ -2470,7 +2470,9 @@ fn test_justice_tx() {
2470
2470
bob_config. peer_channel_config_limits . force_announced_channel_preference = false ;
2471
2471
bob_config. own_channel_config . our_to_self_delay = 6 * 24 * 3 ;
2472
2472
let user_cfgs = [ Some ( alice_config) , Some ( bob_config) ] ;
2473
- let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
2473
+ let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
2474
+ chanmon_cfgs[ 0 ] . keys_manager . disable_revocation_policy_check = true ;
2475
+ chanmon_cfgs[ 1 ] . keys_manager . disable_revocation_policy_check = true ;
2474
2476
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
2475
2477
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & user_cfgs) ;
2476
2478
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -2600,7 +2602,8 @@ fn revoked_output_claim() {
2600
2602
#[ test]
2601
2603
fn claim_htlc_outputs_shared_tx ( ) {
2602
2604
// Node revoked old state, htlcs haven't time out yet, claim them in shared justice tx
2603
- let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
2605
+ let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
2606
+ chanmon_cfgs[ 0 ] . keys_manager . disable_revocation_policy_check = true ;
2604
2607
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
2605
2608
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
2606
2609
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -2670,7 +2673,8 @@ fn claim_htlc_outputs_shared_tx() {
2670
2673
#[ test]
2671
2674
fn claim_htlc_outputs_single_tx ( ) {
2672
2675
// Node revoked old state, htlcs have timed out, claim each of them in separated justice tx
2673
- let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
2676
+ let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
2677
+ chanmon_cfgs[ 0 ] . keys_manager . disable_revocation_policy_check = true ;
2674
2678
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
2675
2679
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
2676
2680
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -4993,7 +4997,8 @@ fn test_static_spendable_outputs_justice_tx_revoked_commitment_tx() {
4993
4997
4994
4998
#[ test]
4995
4999
fn test_static_spendable_outputs_justice_tx_revoked_htlc_timeout_tx ( ) {
4996
- let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
5000
+ let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
5001
+ chanmon_cfgs[ 0 ] . keys_manager . disable_revocation_policy_check = true ;
4997
5002
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
4998
5003
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
4999
5004
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -5059,7 +5064,8 @@ fn test_static_spendable_outputs_justice_tx_revoked_htlc_timeout_tx() {
5059
5064
5060
5065
#[ test]
5061
5066
fn test_static_spendable_outputs_justice_tx_revoked_htlc_success_tx ( ) {
5062
- let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
5067
+ let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
5068
+ chanmon_cfgs[ 1 ] . keys_manager . disable_revocation_policy_check = true ;
5063
5069
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
5064
5070
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
5065
5071
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -7040,7 +7046,8 @@ fn do_test_failure_delay_dust_htlc_local_commitment(announce_latest: bool) {
7040
7046
// We can have at most two valid local commitment tx, so both cases must be covered, and both txs must be checked to get them all as
7041
7047
// HTLC could have been removed from lastest local commitment tx but still valid until we get remote RAA
7042
7048
7043
- let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
7049
+ let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
7050
+ chanmon_cfgs[ 0 ] . keys_manager . disable_revocation_policy_check = true ;
7044
7051
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
7045
7052
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
7046
7053
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -7379,7 +7386,10 @@ fn test_data_loss_protect() {
7379
7386
let fee_estimator;
7380
7387
let tx_broadcaster;
7381
7388
let chain_source;
7382
- let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
7389
+ let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
7390
+ // We broadcast during Drop because chanmon is out of sync with chanmgr, which would cause a panic
7391
+ // during signing due to revoked tx
7392
+ chanmon_cfgs[ 0 ] . keys_manager . disable_revocation_policy_check = true ;
7383
7393
let keys_manager = & chanmon_cfgs[ 0 ] . keys_manager ;
7384
7394
let monitor;
7385
7395
let node_state_0;
@@ -7699,7 +7709,8 @@ fn test_bump_penalty_txn_on_revoked_htlcs() {
7699
7709
// In case of penalty txn with too low feerates for getting into mempools, RBF-bump them to sure
7700
7710
// we're able to claim outputs on revoked HTLC transactions before timelocks expiration
7701
7711
7702
- let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
7712
+ let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
7713
+ chanmon_cfgs[ 1 ] . keys_manager . disable_revocation_policy_check = true ;
7703
7714
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
7704
7715
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
7705
7716
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
0 commit comments