Skip to content

Commit 96b4453

Browse files
committed
f Use deterministic payment keys in fuzzing
1 parent 493ccb6 commit 96b4453

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fuzz/src/chanmon_consistency.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,11 @@ impl SignerProvider for KeyProvider {
370370
&self, _inbound: bool, _channel_value_satoshis: u64, _user_channel_id: u128,
371371
) -> [u8; 32] {
372372
let id = self.rand_bytes_id.fetch_add(1, atomic::Ordering::Relaxed) as u8;
373-
[id; 32]
373+
let mut channel_keys_id = [id; 32];
374+
375+
// We set the first (version) byte to one to use deterministic payment key derivation.
376+
channel_keys_id[0] = 1;
377+
channel_keys_id
374378
}
375379

376380
fn derive_channel_signer(

0 commit comments

Comments
 (0)