Swap key_derivation_params (u64, u64) for channel_keys_id [u8; 32]
[rust-lightning] / lightning / src / ln / functional_tests.rs
index 77b791e0136d759f7d4784c2b9d83f100fa80115..4c15a95eb0e4baeb34ab1e63115727344f8f7234 100644 (file)
@@ -4662,7 +4662,7 @@ macro_rules! check_spendable_outputs {
                                        Event::SpendableOutputs { ref outputs } => {
                                                for outp in outputs {
                                                        match *outp {
-                                                               SpendableOutputDescriptor::StaticOutputCounterpartyPayment { ref outpoint, ref output, ref key_derivation_params } => {
+                                                               SpendableOutputDescriptor::StaticOutputCounterpartyPayment { ref outpoint, ref output, ref channel_keys_id } => {
                                                                        let input = TxIn {
                                                                                previous_output: outpoint.into_bitcoin_outpoint(),
                                                                                script_sig: Script::new(),
@@ -4681,7 +4681,7 @@ macro_rules! check_spendable_outputs {
                                                                        };
                                                                        spend_tx.output[0].value -= (spend_tx.get_weight() + 2 + 1 + 73 + 35 + 3) as u64 / 4; // (Max weight + 3 (to round up)) / 4
                                                                        let secp_ctx = Secp256k1::new();
-                                                                       let keys = $keysinterface.derive_channel_keys($chan_value, key_derivation_params.0, key_derivation_params.1);
+                                                                       let keys = $keysinterface.derive_channel_keys($chan_value, channel_keys_id);
                                                                        let remotepubkey = keys.pubkeys().payment_point;
                                                                        let witness_script = Address::p2pkh(&::bitcoin::PublicKey{compressed: true, key: remotepubkey}, Network::Testnet).script_pubkey();
                                                                        let sighash = Message::from_slice(&bip143::SigHashCache::new(&spend_tx).signature_hash(0, &witness_script, output.value, SigHashType::All)[..]).unwrap();
@@ -4691,7 +4691,7 @@ macro_rules! check_spendable_outputs {
                                                                        spend_tx.input[0].witness.push(remotepubkey.serialize().to_vec());
                                                                        txn.push(spend_tx);
                                                                },
-                                                               SpendableOutputDescriptor::DynamicOutputP2WSH { ref outpoint, ref per_commitment_point, ref to_self_delay, ref output, ref key_derivation_params, ref revocation_pubkey } => {
+                                                               SpendableOutputDescriptor::DynamicOutputP2WSH { ref outpoint, ref per_commitment_point, ref to_self_delay, ref output, ref channel_keys_id, ref revocation_pubkey } => {
                                                                        let input = TxIn {
                                                                                previous_output: outpoint.into_bitcoin_outpoint(),
                                                                                script_sig: Script::new(),
@@ -4709,7 +4709,7 @@ macro_rules! check_spendable_outputs {
                                                                                output: vec![outp],
                                                                        };
                                                                        let secp_ctx = Secp256k1::new();
-                                                                       let keys = $keysinterface.derive_channel_keys($chan_value, key_derivation_params.0, key_derivation_params.1);
+                                                                       let keys = $keysinterface.derive_channel_keys($chan_value, channel_keys_id);
                                                                        if let Ok(delayed_payment_key) = chan_utils::derive_private_key(&secp_ctx, &per_commitment_point, &keys.inner.delayed_payment_base_key) {
 
                                                                                let delayed_payment_pubkey = PublicKey::from_secret_key(&secp_ctx, &delayed_payment_key);