replace use of bitcoin::utils::misc::hex_bytes with hex::decode
[rust-lightning] / src / ln / msgs.rs
index 7f502530a9db55f5177aad787380645d8d72fcf0..f0f28c6b7a8758ee011ecb386921de4b8f45fee3 100644 (file)
@@ -1648,7 +1648,7 @@ impl MsgDecodable for ErrorMessage {
 
 #[cfg(test)]
 mod tests {
-       use bitcoin::util::misc::hex_bytes;
+       use hex;
        use ln::msgs::MsgEncodable;
        use ln::msgs;
        use secp256k1::key::{PublicKey,SecretKey};
@@ -1658,7 +1658,7 @@ mod tests {
        fn encoding_channel_reestablish_no_secret() {
                let public_key = {
                        let secp_ctx = Secp256k1::new();
-                       PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&secp_ctx, &hex_bytes("0101010101010101010101010101010101010101010101010101010101010101").unwrap()[..]).unwrap()).unwrap()
+                       PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&secp_ctx, &hex::decode("0101010101010101010101010101010101010101010101010101010101010101").unwrap()[..]).unwrap()).unwrap()
                };
 
                let cr = msgs::ChannelReestablish {
@@ -1680,7 +1680,7 @@ mod tests {
        fn encoding_channel_reestablish_with_secret() {
                let public_key = {
                        let secp_ctx = Secp256k1::new();
-                       PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&secp_ctx, &hex_bytes("0101010101010101010101010101010101010101010101010101010101010101").unwrap()[..]).unwrap()).unwrap()
+                       PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&secp_ctx, &hex::decode("0101010101010101010101010101010101010101010101010101010101010101").unwrap()[..]).unwrap()).unwrap()
                };
 
                let cr = msgs::ChannelReestablish {