You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`get_channel_signer` previously had two different responsibilites:
generating unique `channel_keys_id` and using said ID to derive channel
keys. We decide to split it into two methods `generate_channel_keys_id`
and `derive_channel_signer`, such that we can use the latter to fulfill
our goal of re-deriving signers instead of persisting them. There's no
point in storing data that can be easily re-derived.
Copy file name to clipboardExpand all lines: lightning/src/ln/chan_utils.rs
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1617,8 +1617,8 @@ mod tests {
1617
1617
let seed = [42;32];
1618
1618
let network = Network::Testnet;
1619
1619
let keys_provider = test_utils::TestKeysInterface::new(&seed, network);
1620
-
let signer = keys_provider.get_channel_signer(false,3000);
1621
-
let counterparty_signer = keys_provider.get_channel_signer(false,3000);
1620
+
let signer = keys_provider.derive_channel_signer(3000, keys_provider.generate_channel_keys_id(0));
1621
+
let counterparty_signer = keys_provider.derive_channel_signer(3000, keys_provider.generate_channel_keys_id(1));
1622
1622
let delayed_payment_base = &signer.pubkeys().delayed_payment_basepoint;
1623
1623
let per_commitment_secret = SecretKey::from_slice(&hex::decode("1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100").unwrap()[..]).unwrap();
1624
1624
let per_commitment_point = PublicKey::from_secret_key(&secp_ctx,&per_commitment_secret);
0 commit comments