Skip to content

Commit baa728e

Browse files
Add deterministic random bytes in override_random_bytes
1 parent 7188d5b commit baa728e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: lightning/src/ln/monitor_tests.rs

+10
Original file line numberDiff line numberDiff line change
@@ -2327,6 +2327,16 @@ fn do_test_restored_packages_retry(check_old_monitor_retries_after_upgrade: bool
23272327
nodes[0].keys_manager.backing.inner.set_counter(0x1_0000_0004);
23282328
nodes[1].keys_manager.backing.inner.set_counter(0x1_0000_0004);
23292329

2330+
// Add deterministic random bytes
2331+
*nodes[0].keys_manager.override_random_bytes.lock().unwrap() = Some([
2332+
34, 179, 149, 142, 142, 70, 235, 119, 164, 188, 180, 189, 160, 46, 59, 32,87, 50, 35, 220,
2333+
63, 181, 17, 19, 187, 212, 122, 14, 222, 35, 36, 8
2334+
]);
2335+
*nodes[1].keys_manager.override_random_bytes.lock().unwrap() = Some([
2336+
208, 0, 214, 32, 31, 17, 107, 175, 211, 121, 241, 214, 29, 241, 97, 185, 85, 205, 48, 159,
2337+
119, 71, 240, 90, 36, 247, 8, 142, 59, 250, 164, 197
2338+
]);
2339+
23302340
// Open a channel, lock in an HTLC, and immediately broadcast the commitment transaction. This
23312341
// ensures that the HTLC timeout package is held until we reach its expiration height.
23322342
let (_, _, chan_id, funding_tx) = create_announced_chan_between_nodes_with_value(&nodes, 0, 1, 100_000, 50_000_000);

0 commit comments

Comments
 (0)