- assert_eq!(route.paths[0].len(), 4);
-
- assert_eq!(route.paths[0][0].pubkey, nodes[1]);
- assert_eq!(route.paths[0][0].short_channel_id, 2);
- assert_eq!(route.paths[0][0].fee_msat, 200);
- assert_eq!(route.paths[0][0].cltv_expiry_delta, 65);
- assert_eq!(route.paths[0][0].node_features.le_flags(), &id_to_feature_flags(2));
- assert_eq!(route.paths[0][0].channel_features.le_flags(), &id_to_feature_flags(2));
-
- assert_eq!(route.paths[0][1].pubkey, nodes[2]);
- assert_eq!(route.paths[0][1].short_channel_id, 4);
- assert_eq!(route.paths[0][1].fee_msat, 100);
- assert_eq!(route.paths[0][1].cltv_expiry_delta, 81);
- assert_eq!(route.paths[0][1].node_features.le_flags(), &id_to_feature_flags(3));
- assert_eq!(route.paths[0][1].channel_features.le_flags(), &id_to_feature_flags(4));
-
- assert_eq!(route.paths[0][2].pubkey, non_announced_pubkey);
- assert_eq!(route.paths[0][2].short_channel_id, last_hops[0].0[0].short_channel_id);
- assert_eq!(route.paths[0][2].fee_msat, 0);
- assert_eq!(route.paths[0][2].cltv_expiry_delta, 129);
- assert_eq!(route.paths[0][2].node_features.le_flags(), default_node_features().le_flags()); // We dont pass flags in from invoices yet
- assert_eq!(route.paths[0][2].channel_features.le_flags(), &Vec::<u8>::new()); // We can't learn any flags from invoices, sadly
-
- assert_eq!(route.paths[0][3].pubkey, nodes[6]);
- assert_eq!(route.paths[0][3].short_channel_id, last_hops[0].0[1].short_channel_id);
- assert_eq!(route.paths[0][3].fee_msat, 100);
- assert_eq!(route.paths[0][3].cltv_expiry_delta, 42);
- assert_eq!(route.paths[0][3].node_features.le_flags(), default_node_features().le_flags()); // We dont pass flags in from invoices yet
- assert_eq!(route.paths[0][3].channel_features.le_flags(), &Vec::<u8>::new()); // We can't learn any flags from invoices, sadly
+ assert_eq!(route.paths[0].hops.len(), 4);
+
+ assert_eq!(route.paths[0].hops[0].pubkey, nodes[1]);
+ assert_eq!(route.paths[0].hops[0].short_channel_id, 2);
+ assert_eq!(route.paths[0].hops[0].fee_msat, 200);
+ assert_eq!(route.paths[0].hops[0].cltv_expiry_delta, 65);
+ assert_eq!(route.paths[0].hops[0].node_features.le_flags(), &id_to_feature_flags(2));
+ assert_eq!(route.paths[0].hops[0].channel_features.le_flags(), &id_to_feature_flags(2));
+
+ assert_eq!(route.paths[0].hops[1].pubkey, nodes[2]);
+ assert_eq!(route.paths[0].hops[1].short_channel_id, 4);
+ assert_eq!(route.paths[0].hops[1].fee_msat, 100);
+ assert_eq!(route.paths[0].hops[1].cltv_expiry_delta, 81);
+ assert_eq!(route.paths[0].hops[1].node_features.le_flags(), &id_to_feature_flags(3));
+ assert_eq!(route.paths[0].hops[1].channel_features.le_flags(), &id_to_feature_flags(4));
+
+ assert_eq!(route.paths[0].hops[2].pubkey, non_announced_pubkey);
+ assert_eq!(route.paths[0].hops[2].short_channel_id, last_hops[0].0[0].short_channel_id);
+ assert_eq!(route.paths[0].hops[2].fee_msat, 0);
+ assert_eq!(route.paths[0].hops[2].cltv_expiry_delta, 129);
+ assert_eq!(route.paths[0].hops[2].node_features.le_flags(), default_node_features().le_flags()); // We dont pass flags in from invoices yet
+ assert_eq!(route.paths[0].hops[2].channel_features.le_flags(), &Vec::<u8>::new()); // We can't learn any flags from invoices, sadly
+
+ assert_eq!(route.paths[0].hops[3].pubkey, nodes[6]);
+ assert_eq!(route.paths[0].hops[3].short_channel_id, last_hops[0].0[1].short_channel_id);
+ assert_eq!(route.paths[0].hops[3].fee_msat, 100);
+ assert_eq!(route.paths[0].hops[3].cltv_expiry_delta, 42);
+ assert_eq!(route.paths[0].hops[3].node_features.le_flags(), default_node_features().le_flags()); // We dont pass flags in from invoices yet
+ assert_eq!(route.paths[0].hops[3].channel_features.le_flags(), &Vec::<u8>::new()); // We can't learn any flags from invoices, sadly