@@ -3978,11 +3978,17 @@ fn test_single_channel_multiple_mpp() {
39783978 let ( updates, raa) = get_updates_and_revoke ( & nodes[ 6 ] , & nodes[ 5 ] . node . get_our_node_id ( ) ) ;
39793979 nodes[ 5 ] . node . handle_update_fulfill_htlc ( node_6_id, & updates. update_fulfill_htlcs [ 0 ] ) ;
39803980 expect_payment_forwarded ! ( nodes[ 5 ] , nodes[ 2 ] , nodes[ 6 ] , Some ( 1000 ) , false , false ) ;
3981- nodes[ 5 ] . node . handle_update_fulfill_htlc ( node_6_id, & updates. update_fulfill_htlcs [ 1 ] ) ;
3982- expect_payment_forwarded ! ( nodes[ 5 ] , nodes[ 3 ] , nodes[ 6 ] , Some ( 1000 ) , false , false ) ;
3981+ if let Some ( update) = updates. update_fulfill_htlcs . get ( 1 ) {
3982+ nodes[ 5 ] . node . handle_update_fulfill_htlc ( node_6_id, update) ;
3983+ expect_payment_forwarded ! ( nodes[ 5 ] , nodes[ 3 ] , nodes[ 6 ] , Some ( 1000 ) , false , false ) ;
3984+ }
39833985 nodes[ 5 ] . node . handle_commitment_signed ( node_6_id, & updates. commitment_signed ) ;
39843986 nodes[ 5 ] . node . handle_revoke_and_ack ( node_6_id, & raa) ;
3985- check_added_monitors ( & nodes[ 5 ] , 4 ) ;
3987+ if updates. update_fulfill_htlcs . get ( 1 ) . is_some ( ) {
3988+ check_added_monitors ( & nodes[ 5 ] , 4 ) ;
3989+ } else {
3990+ check_added_monitors ( & nodes[ 5 ] , 3 ) ;
3991+ }
39863992
39873993 let ( raa, cs) = get_revoke_commit_msgs ( & nodes[ 5 ] , & node_6_id) ;
39883994
@@ -3993,9 +3999,17 @@ fn test_single_channel_multiple_mpp() {
39933999 let ( updates, raa) = get_updates_and_revoke ( & nodes[ 6 ] , & nodes[ 5 ] . node . get_our_node_id ( ) ) ;
39944000 nodes[ 5 ] . node . handle_update_fulfill_htlc ( node_6_id, & updates. update_fulfill_htlcs [ 0 ] ) ;
39954001 expect_payment_forwarded ! ( nodes[ 5 ] , nodes[ 4 ] , nodes[ 6 ] , Some ( 1000 ) , false , false ) ;
4002+ if let Some ( update) = updates. update_fulfill_htlcs . get ( 1 ) {
4003+ nodes[ 5 ] . node . handle_update_fulfill_htlc ( node_6_id, update) ;
4004+ expect_payment_forwarded ! ( nodes[ 5 ] , nodes[ 3 ] , nodes[ 6 ] , Some ( 1000 ) , false , false ) ;
4005+ }
39964006 nodes[ 5 ] . node . handle_commitment_signed ( node_6_id, & updates. commitment_signed ) ;
39974007 nodes[ 5 ] . node . handle_revoke_and_ack ( node_6_id, & raa) ;
3998- check_added_monitors ( & nodes[ 5 ] , 3 ) ;
4008+ if updates. update_fulfill_htlcs . get ( 1 ) . is_some ( ) {
4009+ check_added_monitors ( & nodes[ 5 ] , 4 ) ;
4010+ } else {
4011+ check_added_monitors ( & nodes[ 5 ] , 3 ) ;
4012+ }
39994013
40004014 let ( raa, cs) = get_revoke_commit_msgs ( & nodes[ 5 ] , & node_6_id) ;
40014015 nodes[ 6 ] . node . handle_revoke_and_ack ( node_5_id, & raa) ;
0 commit comments