Pass `counterparty_node_id` to `funding_transaction_generated`
[rust-lightning] / lightning / src / ln / peer_channel_encryptor.rs
index fbd32526ea658470f810c487bcb88da608904e8b..da6dc67aba5c4f52ec9e9dcd819aebf131d33084 100644 (file)
@@ -16,7 +16,7 @@ use bitcoin::hashes::{Hash, HashEngine};
 use bitcoin::hashes::sha256::Hash as Sha256;
 
 use bitcoin::secp256k1::Secp256k1;
-use bitcoin::secp256k1::key::{PublicKey,SecretKey};
+use bitcoin::secp256k1::{PublicKey,SecretKey};
 use bitcoin::secp256k1::ecdh::SharedSecret;
 use bitcoin::secp256k1;
 
@@ -163,7 +163,7 @@ impl PeerChannelEncryptor {
 
        #[inline]
        fn hkdf(state: &mut BidirectionalNoiseState, ss: SharedSecret) -> [u8; 32] {
-               let (t1, t2) = hkdf_extract_expand_twice(&state.ck, &ss[..]);
+               let (t1, t2) = hkdf_extract_expand_twice(&state.ck, ss.as_ref());
                state.ck = t1;
                t2
        }
@@ -473,7 +473,7 @@ impl PeerChannelEncryptor {
 mod tests {
        use super::LN_MAX_MSG_LEN;
 
-       use bitcoin::secp256k1::key::{PublicKey,SecretKey};
+       use bitcoin::secp256k1::{PublicKey,SecretKey};
 
        use hex;