Skip to content

Commit 7a50154

Browse files
Update BOLT4 onion test vectors
1 parent 6777ab6 commit 7a50154

File tree

2 files changed

+108
-91
lines changed

2 files changed

+108
-91
lines changed

lightning/src/ln/onion_route_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ fn test_onion_failure() {
344344
// break the first (non-final) hop payload by swapping the realm (0) byte for a byte
345345
// describing a length-1 TLV payload, which is obviously bogus.
346346
new_payloads[0].data[0] = 1;
347-
msg.onion_routing_packet = onion_utils::construct_onion_packet_bogus_hopdata(new_payloads, onion_keys, [0; 32], &payment_hash);
347+
msg.onion_routing_packet = onion_utils::construct_onion_packet_with_writable_hopdata(new_payloads, onion_keys, [0; 32], &payment_hash);
348348
}, ||{}, true, Some(PERM|22), Some(NetworkUpdate::ChannelFailure{short_channel_id, is_permanent: true}), Some(short_channel_id));
349349

350350
// final node failure
@@ -361,7 +361,7 @@ fn test_onion_failure() {
361361
// break the last-hop payload by swapping the realm (0) byte for a byte describing a
362362
// length-1 TLV payload, which is obviously bogus.
363363
new_payloads[1].data[0] = 1;
364-
msg.onion_routing_packet = onion_utils::construct_onion_packet_bogus_hopdata(new_payloads, onion_keys, [0; 32], &payment_hash);
364+
msg.onion_routing_packet = onion_utils::construct_onion_packet_with_writable_hopdata(new_payloads, onion_keys, [0; 32], &payment_hash);
365365
}, ||{}, false, Some(PERM|22), Some(NetworkUpdate::ChannelFailure{short_channel_id, is_permanent: true}), Some(short_channel_id));
366366

367367
// the following three with run_onion_failure_test_with_fail_intercept() test only the origin node

0 commit comments

Comments
 (0)