@@ -1514,65 +1514,6 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out, anchors: bool) {
15141514 0x26 => process_ev_noret ! ( 2 , true ) ,
15151515 0x27 => process_ev_noret ! ( 2 , false ) ,
15161516
1517- 0xb0 | 0xb1 | 0xb2 => {
1518- // Restart node A, picking among the in-flight `ChannelMonitor`s to use based on
1519- // the value of `v` we're matching.
1520- if !chan_a_disconnected {
1521- nodes[ 1 ] . peer_disconnected ( nodes[ 0 ] . get_our_node_id ( ) ) ;
1522- chan_a_disconnected = true ;
1523- push_excess_b_events ! (
1524- nodes[ 1 ] . get_and_clear_pending_msg_events( ) . drain( ..) ,
1525- Some ( 0 )
1526- ) ;
1527- ab_events. clear ( ) ;
1528- ba_events. clear ( ) ;
1529- }
1530- let ( new_node_a, new_monitor_a) =
1531- reload_node ! ( node_a_ser, 0 , monitor_a, v, keys_manager_a, fee_est_a) ;
1532- nodes[ 0 ] = new_node_a;
1533- monitor_a = new_monitor_a;
1534- } ,
1535- 0xb3 ..=0xbb => {
1536- // Restart node B, picking among the in-flight `ChannelMonitor`s to use based on
1537- // the value of `v` we're matching.
1538- if !chan_a_disconnected {
1539- nodes[ 0 ] . peer_disconnected ( nodes[ 1 ] . get_our_node_id ( ) ) ;
1540- chan_a_disconnected = true ;
1541- nodes[ 0 ] . get_and_clear_pending_msg_events ( ) ;
1542- ab_events. clear ( ) ;
1543- ba_events. clear ( ) ;
1544- }
1545- if !chan_b_disconnected {
1546- nodes[ 2 ] . peer_disconnected ( nodes[ 1 ] . get_our_node_id ( ) ) ;
1547- chan_b_disconnected = true ;
1548- nodes[ 2 ] . get_and_clear_pending_msg_events ( ) ;
1549- bc_events. clear ( ) ;
1550- cb_events. clear ( ) ;
1551- }
1552- let ( new_node_b, new_monitor_b) =
1553- reload_node ! ( node_b_ser, 1 , monitor_b, v, keys_manager_b, fee_est_b) ;
1554- nodes[ 1 ] = new_node_b;
1555- monitor_b = new_monitor_b;
1556- } ,
1557- 0xbc | 0xbd | 0xbe => {
1558- // Restart node C, picking among the in-flight `ChannelMonitor`s to use based on
1559- // the value of `v` we're matching.
1560- if !chan_b_disconnected {
1561- nodes[ 1 ] . peer_disconnected ( nodes[ 2 ] . get_our_node_id ( ) ) ;
1562- chan_b_disconnected = true ;
1563- push_excess_b_events ! (
1564- nodes[ 1 ] . get_and_clear_pending_msg_events( ) . drain( ..) ,
1565- Some ( 2 )
1566- ) ;
1567- bc_events. clear ( ) ;
1568- cb_events. clear ( ) ;
1569- }
1570- let ( new_node_c, new_monitor_c) =
1571- reload_node ! ( node_c_ser, 2 , monitor_c, v, keys_manager_c, fee_est_c) ;
1572- nodes[ 2 ] = new_node_c;
1573- monitor_c = new_monitor_c;
1574- } ,
1575-
15761517 // 1/10th the channel size:
15771518 0x30 => send_noret ( & nodes[ 0 ] , & nodes[ 1 ] , chan_a, 10_000_000 , & mut p_id, & mut p_idx) ,
15781519 0x31 => send_noret ( & nodes[ 1 ] , & nodes[ 0 ] , chan_a, 10_000_000 , & mut p_id, & mut p_idx) ,
@@ -1720,6 +1661,65 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out, anchors: bool) {
17201661 nodes[ 2 ] . maybe_propose_quiescence ( & nodes[ 1 ] . get_our_node_id ( ) , & chan_b_id) . unwrap ( )
17211662 } ,
17221663
1664+ 0xb0 | 0xb1 | 0xb2 => {
1665+ // Restart node A, picking among the in-flight `ChannelMonitor`s to use based on
1666+ // the value of `v` we're matching.
1667+ if !chan_a_disconnected {
1668+ nodes[ 1 ] . peer_disconnected ( nodes[ 0 ] . get_our_node_id ( ) ) ;
1669+ chan_a_disconnected = true ;
1670+ push_excess_b_events ! (
1671+ nodes[ 1 ] . get_and_clear_pending_msg_events( ) . drain( ..) ,
1672+ Some ( 0 )
1673+ ) ;
1674+ ab_events. clear ( ) ;
1675+ ba_events. clear ( ) ;
1676+ }
1677+ let ( new_node_a, new_monitor_a) =
1678+ reload_node ! ( node_a_ser, 0 , monitor_a, v, keys_manager_a, fee_est_a) ;
1679+ nodes[ 0 ] = new_node_a;
1680+ monitor_a = new_monitor_a;
1681+ } ,
1682+ 0xb3 ..=0xbb => {
1683+ // Restart node B, picking among the in-flight `ChannelMonitor`s to use based on
1684+ // the value of `v` we're matching.
1685+ if !chan_a_disconnected {
1686+ nodes[ 0 ] . peer_disconnected ( nodes[ 1 ] . get_our_node_id ( ) ) ;
1687+ chan_a_disconnected = true ;
1688+ nodes[ 0 ] . get_and_clear_pending_msg_events ( ) ;
1689+ ab_events. clear ( ) ;
1690+ ba_events. clear ( ) ;
1691+ }
1692+ if !chan_b_disconnected {
1693+ nodes[ 2 ] . peer_disconnected ( nodes[ 1 ] . get_our_node_id ( ) ) ;
1694+ chan_b_disconnected = true ;
1695+ nodes[ 2 ] . get_and_clear_pending_msg_events ( ) ;
1696+ bc_events. clear ( ) ;
1697+ cb_events. clear ( ) ;
1698+ }
1699+ let ( new_node_b, new_monitor_b) =
1700+ reload_node ! ( node_b_ser, 1 , monitor_b, v, keys_manager_b, fee_est_b) ;
1701+ nodes[ 1 ] = new_node_b;
1702+ monitor_b = new_monitor_b;
1703+ } ,
1704+ 0xbc | 0xbd | 0xbe => {
1705+ // Restart node C, picking among the in-flight `ChannelMonitor`s to use based on
1706+ // the value of `v` we're matching.
1707+ if !chan_b_disconnected {
1708+ nodes[ 1 ] . peer_disconnected ( nodes[ 2 ] . get_our_node_id ( ) ) ;
1709+ chan_b_disconnected = true ;
1710+ push_excess_b_events ! (
1711+ nodes[ 1 ] . get_and_clear_pending_msg_events( ) . drain( ..) ,
1712+ Some ( 2 )
1713+ ) ;
1714+ bc_events. clear ( ) ;
1715+ cb_events. clear ( ) ;
1716+ }
1717+ let ( new_node_c, new_monitor_c) =
1718+ reload_node ! ( node_c_ser, 2 , monitor_c, v, keys_manager_c, fee_est_c) ;
1719+ nodes[ 2 ] = new_node_c;
1720+ monitor_c = new_monitor_c;
1721+ } ,
1722+
17231723 0xf0 => complete_monitor_update ( & monitor_a, & chan_1_id, & complete_first) ,
17241724 0xf1 => complete_monitor_update ( & monitor_a, & chan_1_id, & complete_second) ,
17251725 0xf2 => complete_monitor_update ( & monitor_a, & chan_1_id, & Vec :: pop) ,
0 commit comments