Skip to content

Commit aae0775

Browse files
committed
f Fix test comment gleb noted
1 parent 7c2deb1 commit aae0775

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lightning/src/routing/router.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3533,7 +3533,7 @@ mod tests {
35333533
let (our_privkey, our_id, privkeys, nodes) = get_nodes(&secp_ctx);
35343534

35353535
// We modify the graph to set the htlc_minimum of channel 2 and 4 as needed - channel 2
3536-
// gets an htlc_minimum_msat of 80_000 and channel 4 an htlc_maximum_msat of 90_000. We
3536+
// gets an htlc_maximum_msat of 80_000 and channel 4 an htlc_minimum_msat of 90_000. We
35373537
// then try to send 90_000.
35383538
update_channel(&net_graph_msg_handler, &secp_ctx, &our_privkey, UnsignedChannelUpdate {
35393539
chain_hash: genesis_block(Network::Testnet).header.block_hash(),
@@ -3561,8 +3561,9 @@ mod tests {
35613561
});
35623562

35633563
{
3564-
// Now, attempt to route 125 sats (just a bit below the capacity of 3 channels).
3565-
// Our algorithm should provide us with these 3 paths.
3564+
// Now, attempt to route 90 sats, hitting the htlc_minimum on channel 4, but
3565+
// overshooting the htlc_maximum on channel 2. Thus, we should pick the (absurdly
3566+
// expensive) channels 12-13 path.
35663567
let route = get_route(&our_id, &net_graph_msg_handler.network_graph.read().unwrap(), &nodes[2], Some(InvoiceFeatures::known()), None, &Vec::new(), 90_000, 42, Arc::clone(&logger)).unwrap();
35673568
assert_eq!(route.paths.len(), 1);
35683569
assert_eq!(route.paths[0].len(), 2);

0 commit comments

Comments
 (0)