-
Notifications
You must be signed in to change notification settings - Fork 410
Fix flaky trampoline_single_hop_receive
test
#3784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
TheBlueMatt
merged 1 commit into
lightningdevkit:main
from
tnull:2025-05-fix-flaky-single-hop-receive-test
May 21, 2025
Merged
Fix flaky trampoline_single_hop_receive
test
#3784
TheBlueMatt
merged 1 commit into
lightningdevkit:main
from
tnull:2025-05-fix-flaky-single-hop-receive-test
May 21, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
👋 Thanks for assigning @arik-so as a reviewer! |
arik-so
previously approved these changes
May 19, 2025
TheBlueMatt
reviewed
May 19, 2025
e1f11a0
to
58d8ed9
Compare
Force-pushed the following fixup: > git diff-tree -U2 e1f11a082 ddec70
diff --git a/lightning/src/ln/blinded_payment_tests.rs b/lightning/src/ln/blinded_payment_tests.rs
index f0b0a581d..d517365d9 100644
--- a/lightning/src/ln/blinded_payment_tests.rs
+++ b/lightning/src/ln/blinded_payment_tests.rs
@@ -1989,8 +1989,4 @@ fn do_test_trampoline_single_hop_receive(success: bool) {
let mut nodes = create_network(TOTAL_NODE_COUNT, &node_cfgs, &node_chanmgrs);
- // We need the session priv to construct an invalid onion packet later.
- let override_random_bytes = [3; 32];
- *nodes[0].keys_manager.override_random_bytes.lock().unwrap() = Some(override_random_bytes);
-
let (_, _, chan_id_alice_bob, _) = create_announced_chan_between_nodes_with_value(&nodes, 0, 1, 1_000_000, 0);
let (_, _, chan_id_bob_carol, _) = create_announced_chan_between_nodes_with_value(&nodes, 1, 2, 1_000_000, 0);
@@ -2010,5 +2006,5 @@ fn do_test_trampoline_single_hop_receive(success: bool) {
let (payment_preimage, payment_hash, payment_secret) = get_payment_preimage_hash(&nodes[2], Some(amt_msat), None);
- let carol_alice_trampoline_session_priv = SecretKey::from_slice(&override_random_bytes).unwrap();
+ let carol_alice_trampoline_session_priv = secret_from_hex("a0f4b8d7b6c2d0ffdfaf718f76e9decaef4d9fb38a8c4addb95c4007cc3eee03");
let carol_blinding_point = PublicKey::from_secret_key(&secp_ctx, &carol_alice_trampoline_session_priv);
let carol_blinded_hops = if success {
@@ -2098,4 +2094,8 @@ fn do_test_trampoline_single_hop_receive(success: bool) {
};
+ // We need the session priv to construct an invalid onion packet later.
+ let override_random_bytes = [3; 32];
+ *nodes[0].keys_manager.override_random_bytes.lock().unwrap() = Some(override_random_bytes);
+
nodes[0].node.send_payment_with_route(route.clone(), payment_hash, RecipientOnionFields::spontaneous_empty(), PaymentId(payment_hash.0)).unwrap(); |
.. we override the RNG to fix the flaky test case.
58d8ed9
to
ddec702
Compare
dunxen
approved these changes
May 20, 2025
TheBlueMatt
approved these changes
May 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fine enough
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #3716.
.. we override the RNG to fix the flaky test case, thereby unblocking #3623.