@@ -438,7 +438,7 @@ fn assert_any_node_has_onchain_tx_type<F: Fn(&TransactionType) -> bool + Copy>(
438438}
439439
440440fn assert_all_nodes_have_onchain_tx_type < F : Fn ( & TransactionType ) -> bool + Copy > (
441- nodes : & [ ( & str , & TestNode ) ] , tx_type_name : & str , predicate : F ,
441+ nodes : & [ ( & str , & TestNode ) ] , panic_msg : & str , tx_type_name : & str , predicate : F ,
442442) {
443443 if nodes. iter ( ) . all ( |( _, node) | has_onchain_tx_type ( node, predicate) ) {
444444 return ;
@@ -454,8 +454,8 @@ fn assert_all_nodes_have_onchain_tx_type<F: Fn(&TransactionType) -> bool + Copy>
454454 } )
455455 . collect ( ) ;
456456 panic ! (
457- "Expected all nodes to have on-chain payment with tx_type {}; observed {:?}" ,
458- tx_type_name, observed
457+ "Expected {} nodes to have on-chain payment with tx_type {}; observed {:?}" ,
458+ panic_msg , tx_type_name, observed
459459 ) ;
460460}
461461
@@ -1707,10 +1707,11 @@ pub(crate) async fn do_channel_full_cycle<E: ElectrumApi>(
17071707 node_a. list_peers( ) . iter( ) . any( |p| p. node_id == node_b. node_id( ) && p. is_persisted) ,
17081708 "node_b should remain persisted in node_a peer store after locally-initiated force-close"
17091709 ) ;
1710- assert_any_node_has_onchain_tx_type (
1710+ assert_all_nodes_have_onchain_tx_type (
17111711 & [ ( "node_a" , & node_a) , ( "node_b" , & node_b) ] ,
1712+ "no " ,
17121713 "UnilateralClose" ,
1713- |tx_type| matches ! ( tx_type, TransactionType :: UnilateralClose { .. } ) ,
1714+ |tx_type| ! matches ! ( tx_type, TransactionType :: UnilateralClose { .. } ) ,
17141715 ) ;
17151716 assert_any_node_has_onchain_tx_type (
17161717 & [ ( "node_a" , & node_a) , ( "node_b" , & node_b) ] ,
@@ -1720,6 +1721,7 @@ pub(crate) async fn do_channel_full_cycle<E: ElectrumApi>(
17201721 } else {
17211722 assert_all_nodes_have_onchain_tx_type (
17221723 & [ ( "node_a" , & node_a) , ( "node_b" , & node_b) ] ,
1724+ "all " ,
17231725 "CooperativeClose" ,
17241726 |tx_type| matches ! ( tx_type, TransactionType :: CooperativeClose { .. } ) ,
17251727 ) ;
0 commit comments