} else {
assert!(false);
}
- //Confirm the channel was closed
- {
- assert_eq!(nodes[1].node.channel_state.lock().unwrap().by_id.len(), 0);
- }
+ assert!(nodes[1].node.list_channels().is_empty());
check_closed_broadcast!(nodes[1]);
}
assert!(false);
}
- //Confirm the channel was closed
- {
- assert_eq!(nodes[1].node.channel_state.lock().unwrap().by_id.len(), 0);
- }
+ assert!(nodes[1].node.list_channels().is_empty());
check_closed_broadcast!(nodes[1]);
}
assert!(false);
}
- //Confirm the channel was closed
- {
- assert_eq!(nodes[1].node.channel_state.lock().unwrap().by_id.len(), 0);
- }
+ assert!(nodes[1].node.list_channels().is_empty());
check_closed_broadcast!(nodes[1]);
}
assert!(false);
}
- //Confirm the channel was closed
- {
- assert_eq!(nodes[1].node.channel_state.lock().unwrap().by_id.len(), 0);
- }
- //Clear unhandled msg events.
- let _ = nodes[1].node.get_and_clear_pending_msg_events();
+ assert!(nodes[1].node.list_channels().is_empty());
+ check_closed_broadcast!(nodes[1]);
}
#[test]
assert!(false);
}
- //Confirm the channel was closed
- {
- assert_eq!(nodes[1].node.channel_state.lock().unwrap().by_id.len(), 0);
- }
+ assert!(nodes[1].node.list_channels().is_empty());
check_closed_broadcast!(nodes[1]);
}
let (_, our_payment_hash) = get_payment_preimage_hash!(nodes[0]);
nodes[0].node.send_payment(route, our_payment_hash).unwrap();
check_added_monitors!(nodes[0], 1);
- let mut updates = get_htlc_update_msgs!(nodes[0], nodes[1].node.get_our_node_id());
+ let updates = get_htlc_update_msgs!(nodes[0], nodes[1].node.get_our_node_id());
let _ = nodes[1].node.handle_update_add_htlc(&nodes[0].node.get_our_node_id(), &updates.update_add_htlcs[0]);
assert_eq!(nodes[1].node.channel_state.lock().unwrap().by_id.get(&chan.2).unwrap().next_remote_htlc_id, 1);