@@ -2470,7 +2470,9 @@ fn test_justice_tx() {
24702470 bob_config. peer_channel_config_limits . force_announced_channel_preference = false ;
24712471 bob_config. own_channel_config . our_to_self_delay = 6 * 24 * 3 ;
24722472 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 ;
24742476 let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
24752477 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & user_cfgs) ;
24762478 let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -2600,7 +2602,8 @@ fn revoked_output_claim() {
26002602#[ test]
26012603fn claim_htlc_outputs_shared_tx ( ) {
26022604 // 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 ;
26042607 let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
26052608 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
26062609 let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -2670,7 +2673,8 @@ fn claim_htlc_outputs_shared_tx() {
26702673#[ test]
26712674fn claim_htlc_outputs_single_tx ( ) {
26722675 // 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 ;
26742678 let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
26752679 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
26762680 let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -4993,7 +4997,8 @@ fn test_static_spendable_outputs_justice_tx_revoked_commitment_tx() {
49934997
49944998#[ test]
49954999fn 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 ;
49975002 let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
49985003 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
49995004 let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -5059,7 +5064,8 @@ fn test_static_spendable_outputs_justice_tx_revoked_htlc_timeout_tx() {
50595064
50605065#[ test]
50615066fn 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 ;
50635069 let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
50645070 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
50655071 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) {
70407046 // 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
70417047 // HTLC could have been removed from lastest local commitment tx but still valid until we get remote RAA
70427048
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 ;
70447051 let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
70457052 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
70467053 let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
@@ -7379,7 +7386,10 @@ fn test_data_loss_protect() {
73797386 let fee_estimator;
73807387 let tx_broadcaster;
73817388 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 ;
73837393 let keys_manager = & chanmon_cfgs[ 0 ] . keys_manager ;
73847394 let monitor;
73857395 let node_state_0;
@@ -7699,7 +7709,8 @@ fn test_bump_penalty_txn_on_revoked_htlcs() {
76997709 // In case of penalty txn with too low feerates for getting into mempools, RBF-bump them to sure
77007710 // we're able to claim outputs on revoked HTLC transactions before timelocks expiration
77017711
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 ;
77037714 let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
77047715 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
77057716 let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
0 commit comments