@@ -7157,60 +7157,6 @@ fn test_failure_delay_dust_htlc_local_commitment() {
7157
7157
do_test_failure_delay_dust_htlc_local_commitment ( false ) ;
7158
7158
}
7159
7159
7160
- #[ test]
7161
- fn test_no_failure_dust_htlc_local_commitment ( ) {
7162
- // Transaction filters for failing back dust htlc based on local commitment txn infos has been
7163
- // prone to error, we test here that a dummy transaction don't fail them.
7164
-
7165
- let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
7166
- let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
7167
- let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
7168
- let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
7169
- let chan = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
7170
-
7171
- // Rebalance a bit
7172
- send_payment ( & nodes[ 0 ] , & vec ! ( & nodes[ 1 ] ) [ ..] , 8000000 , 8_000_000 ) ;
7173
-
7174
- let as_dust_limit = nodes[ 0 ] . node . channel_state . lock ( ) . unwrap ( ) . by_id . get ( & chan. 2 ) . unwrap ( ) . holder_dust_limit_satoshis ;
7175
- let bs_dust_limit = nodes[ 1 ] . node . channel_state . lock ( ) . unwrap ( ) . by_id . get ( & chan. 2 ) . unwrap ( ) . holder_dust_limit_satoshis ;
7176
-
7177
- // We route 2 dust-HTLCs between A and B
7178
- let ( preimage_1, _) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , bs_dust_limit* 1000 ) ;
7179
- let ( preimage_2, _) = route_payment ( & nodes[ 1 ] , & [ & nodes[ 0 ] ] , as_dust_limit* 1000 ) ;
7180
-
7181
- // Build a dummy invalid transaction trying to spend a commitment tx
7182
- let input = TxIn {
7183
- previous_output : BitcoinOutPoint { txid : chan. 3 . txid ( ) , vout : 0 } ,
7184
- script_sig : Script :: new ( ) ,
7185
- sequence : 0 ,
7186
- witness : Vec :: new ( ) ,
7187
- } ;
7188
-
7189
- let outp = TxOut {
7190
- script_pubkey : Builder :: new ( ) . push_opcode ( opcodes:: all:: OP_RETURN ) . into_script ( ) ,
7191
- value : 10000 ,
7192
- } ;
7193
-
7194
- let dummy_tx = Transaction {
7195
- version : 2 ,
7196
- lock_time : 0 ,
7197
- input : vec ! [ input] ,
7198
- output : vec ! [ outp]
7199
- } ;
7200
-
7201
- let header = BlockHeader { version : 0x20000000 , prev_blockhash : Default :: default ( ) , merkle_root : Default :: default ( ) , time : 42 , bits : 42 , nonce : 42 } ;
7202
- nodes[ 0 ] . chain_monitor . chain_monitor . block_connected ( & header, & [ ( 0 , & dummy_tx) ] , 1 ) ;
7203
- assert_eq ! ( nodes[ 0 ] . node. get_and_clear_pending_events( ) . len( ) , 0 ) ;
7204
- assert_eq ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . len( ) , 0 ) ;
7205
- // We broadcast a few more block to check everything is all right
7206
- connect_blocks ( & nodes[ 0 ] , 20 , 1 , true , header. block_hash ( ) ) ;
7207
- assert_eq ! ( nodes[ 0 ] . node. get_and_clear_pending_events( ) . len( ) , 0 ) ;
7208
- assert_eq ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . len( ) , 0 ) ;
7209
-
7210
- claim_payment ( & nodes[ 0 ] , & vec ! ( & nodes[ 1 ] ) [ ..] , preimage_1, bs_dust_limit* 1000 ) ;
7211
- claim_payment ( & nodes[ 1 ] , & vec ! ( & nodes[ 0 ] ) [ ..] , preimage_2, as_dust_limit* 1000 ) ;
7212
- }
7213
-
7214
7160
fn do_test_sweep_outbound_htlc_failure_update ( revoked : bool , local : bool ) {
7215
7161
// Outbound HTLC-failure updates must be cancelled if we get a reorg before we reach ANTI_REORG_DELAY.
7216
7162
// Broadcast of revoked remote commitment tx, trigger failure-update of dust/non-dust HTLCs
0 commit comments