Skip to content

Commit 5a47b62

Browse files
committed
f - Fix for onion_route_tests to prevent payment_hash assertion
1 parent 38e543e commit 5a47b62

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lightning/src/ln/onion_route_tests.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,11 +477,19 @@ fn test_onion_failure() {
477477
bogus_route.paths[0][route_len-1].fee_msat = amt_to_forward;
478478
run_onion_failure_test("amount_below_minimum", 0, &nodes, &bogus_route, &payment_hash, &payment_secret, |_| {}, ||{}, true, Some(UPDATE|11), Some(NetworkUpdate::ChannelUpdateMessage{msg: ChannelUpdate::dummy(short_channel_id)}), Some(short_channel_id));
479479

480+
for node in nodes.iter() {
481+
*node.keys_manager.override_session_priv.lock().unwrap() = Some([4; 32]);
482+
}
483+
480484
// Test a positive test-case with one extra msat, meeting the minimum.
481485
bogus_route.paths[0][route_len-1].fee_msat = amt_to_forward + 1;
482486
let preimage = send_along_route(&nodes[0], bogus_route, &[&nodes[1], &nodes[2]], amt_to_forward+1).0;
483487
claim_payment(&nodes[0], &[&nodes[1], &nodes[2]], preimage);
484488

489+
for node in nodes.iter() {
490+
*node.keys_manager.override_session_priv.lock().unwrap() = Some([3; 32]);
491+
}
492+
485493
//TODO: with new config API, we will be able to generate both valid and
486494
//invalid channel_update cases.
487495
let short_channel_id = channels[0].0.contents.short_channel_id;

0 commit comments

Comments
 (0)