@@ -171,7 +171,7 @@ fn do_chanmon_claim_value_coop_close(anchors: bool) {
171
171
user_config. manually_accept_inbound_channels = true ;
172
172
}
173
173
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ Some ( user_config) , Some ( user_config) ] ) ;
174
- let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
174
+ let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
175
175
176
176
let ( _, _, chan_id, funding_tx) =
177
177
create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1_000_000 , 1_000_000 ) ;
@@ -282,8 +282,10 @@ fn do_chanmon_claim_value_coop_close(anchors: bool) {
282
282
connect_blocks ( & nodes[ 0 ] , 2017 ) ;
283
283
// Second call after 2016+ blocks, should archive the monitor
284
284
nodes[ 0 ] . chain_monitor . chain_monitor . archive_stale_channel_monitors ( vec ! [ funding_outpoint] ) ;
285
+ assert ! ( nodes[ 0 ] . chain_monitor. chain_monitor. get_and_clear_pending_events( ) . is_empty( ) ) ;
285
286
assert_eq ! ( nodes[ 0 ] . chain_monitor. chain_monitor. list_monitors( ) . len( ) , 0 ) ;
286
- // failing on test exit while dropping the node
287
+ // reset watched_outputs and txn
288
+ nodes. get_mut ( 0 ) . unwrap ( ) . chain_source . reset_watched_txn_and_outputs ( funding_outpoint, funding_tx. txid ( ) , funding_tx. output [ 0 ] . script_pubkey . clone ( ) ) ;
287
289
}
288
290
289
291
#[ test]
0 commit comments