@@ -540,6 +540,13 @@ fn async_receive_mpp() {
540540 create_announced_chan_between_nodes ( & nodes, 0 , 2 ) ;
541541 create_unannounced_chan_between_nodes_with_value ( & nodes, 1 , 3 , 1_000_000 , 0 ) ;
542542 create_unannounced_chan_between_nodes_with_value ( & nodes, 2 , 3 , 1_000_000 , 0 ) ;
543+
544+ // Ensure all nodes start at the same height.
545+ connect_blocks ( & nodes[ 0 ] , 4 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 0 ] . best_block_info ( ) . 1 ) ;
546+ connect_blocks ( & nodes[ 1 ] , 4 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 1 ] . best_block_info ( ) . 1 ) ;
547+ connect_blocks ( & nodes[ 2 ] , 4 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 2 ] . best_block_info ( ) . 1 ) ;
548+ connect_blocks ( & nodes[ 3 ] , 4 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 3 ] . best_block_info ( ) . 1 ) ;
549+
543550 let ( offer, static_invoice) = create_static_invoice ( & nodes[ 1 ] , & nodes[ 3 ] , None , & secp_ctx) ;
544551
545552 // In other tests we hardcode the sender's random bytes so we can predict the keysend preimage to
@@ -622,6 +629,12 @@ fn amount_doesnt_match_invreq() {
622629 create_unannounced_chan_between_nodes_with_value ( & nodes, 1 , 3 , 1_000_000 , 0 ) ;
623630 create_unannounced_chan_between_nodes_with_value ( & nodes, 2 , 3 , 1_000_000 , 0 ) ;
624631
632+ // Ensure all nodes start at the same height.
633+ connect_blocks ( & nodes[ 0 ] , 4 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 0 ] . best_block_info ( ) . 1 ) ;
634+ connect_blocks ( & nodes[ 1 ] , 4 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 1 ] . best_block_info ( ) . 1 ) ;
635+ connect_blocks ( & nodes[ 2 ] , 4 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 2 ] . best_block_info ( ) . 1 ) ;
636+ connect_blocks ( & nodes[ 3 ] , 4 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 3 ] . best_block_info ( ) . 1 ) ;
637+
625638 let ( offer, static_invoice) = create_static_invoice ( & nodes[ 1 ] , & nodes[ 3 ] , None , & secp_ctx) ;
626639
627640 // Set the random bytes so we can predict the payment preimage and hash.
@@ -815,9 +828,15 @@ fn invalid_async_receive_with_retry<F1, F2>(
815828 let node_chanmgrs =
816829 create_node_chanmgrs ( 3 , & node_cfgs, & [ None , Some ( allow_priv_chan_fwds_cfg) , None ] ) ;
817830 let nodes = create_network ( 3 , & node_cfgs, & node_chanmgrs) ;
831+
818832 create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1_000_000 , 0 ) ;
819833 create_unannounced_chan_between_nodes_with_value ( & nodes, 1 , 2 , 1_000_000 , 0 ) ;
820834
835+ // Ensure all nodes start at the same height.
836+ connect_blocks ( & nodes[ 0 ] , 2 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 0 ] . best_block_info ( ) . 1 ) ;
837+ connect_blocks ( & nodes[ 1 ] , 2 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 1 ] . best_block_info ( ) . 1 ) ;
838+ connect_blocks ( & nodes[ 2 ] , 2 * CHAN_CONFIRM_DEPTH + 1 - nodes[ 2 ] . best_block_info ( ) . 1 ) ;
839+
821840 let blinded_paths_to_always_online_node = nodes[ 1 ]
822841 . message_router
823842 . create_blinded_paths (
0 commit comments