@@ -121,11 +121,12 @@ pub struct Node<'a, 'b: 'a, 'c: 'b> {
121
121
pub network_payment_count : Rc < RefCell < u8 > > ,
122
122
pub network_chan_count : Rc < RefCell < u32 > > ,
123
123
pub logger : & ' c test_utils:: TestLogger ,
124
+ pub is_failed : bool ,
124
125
}
125
126
126
127
impl < ' a , ' b , ' c > Drop for Node < ' a , ' b , ' c > {
127
128
fn drop ( & mut self ) {
128
- if !:: std:: thread:: panicking ( ) {
129
+ if !:: std:: thread:: panicking ( ) && ! self . is_failed {
129
130
// Check that we processed all pending events
130
131
assert ! ( self . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
131
132
assert ! ( self . node. get_and_clear_pending_events( ) . is_empty( ) ) ;
@@ -1180,7 +1181,7 @@ pub fn create_network<'a, 'b: 'a, 'c: 'b>(node_count: usize, cfgs: &'b Vec<NodeC
1180
1181
tx_broadcaster : cfgs[ i] . tx_broadcaster , chain_monitor : & cfgs[ i] . chain_monitor ,
1181
1182
keys_manager : & cfgs[ i] . keys_manager , node : & chan_mgrs[ i] , net_graph_msg_handler,
1182
1183
node_seed : cfgs[ i] . node_seed , network_chan_count : chan_count. clone ( ) ,
1183
- network_payment_count : payment_count. clone ( ) , logger : cfgs[ i] . logger ,
1184
+ network_payment_count : payment_count. clone ( ) , logger : cfgs[ i] . logger , is_failed : false
1184
1185
} )
1185
1186
}
1186
1187
0 commit comments