From: Dr. Maxim Orlovsky Date: Mon, 27 Apr 2020 14:51:59 +0000 (+0200) Subject: BDR: Linearizing secp256k1 deps X-Git-Tag: v0.0.12~70^2~2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=eff8af21103e43f763cb10ae6a75c1543a2d4068;p=rust-lightning BDR: Linearizing secp256k1 deps --- diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs index 344d099ff..d458c6b96 100644 --- a/fuzz/src/chanmon_consistency.rs +++ b/fuzz/src/chanmon_consistency.rs @@ -40,8 +40,8 @@ use lightning::util::ser::{Readable, ReadableArgs, Writeable, Writer}; use utils::test_logger; -use secp256k1::key::{PublicKey,SecretKey}; -use secp256k1::Secp256k1; +use bitcoin::secp256k1::key::{PublicKey,SecretKey}; +use bitcoin::secp256k1::Secp256k1; use std::mem; use std::cmp::Ordering; diff --git a/fuzz/src/full_stack.rs b/fuzz/src/full_stack.rs index d8b58264e..83318abe8 100644 --- a/fuzz/src/full_stack.rs +++ b/fuzz/src/full_stack.rs @@ -32,8 +32,8 @@ use lightning::util::config::UserConfig; use utils::test_logger; -use secp256k1::key::{PublicKey,SecretKey}; -use secp256k1::Secp256k1; +use bitcoin::secp256k1::key::{PublicKey,SecretKey}; +use bitcoin::secp256k1::Secp256k1; use std::cell::RefCell; use std::collections::{HashMap, hash_map}; diff --git a/fuzz/src/peer_crypt.rs b/fuzz/src/peer_crypt.rs index 176a7caab..0d200d83a 100644 --- a/fuzz/src/peer_crypt.rs +++ b/fuzz/src/peer_crypt.rs @@ -1,6 +1,6 @@ use lightning::ln::peer_channel_encryptor::PeerChannelEncryptor; -use secp256k1::key::{PublicKey,SecretKey}; +use bitcoin::secp256k1::key::{PublicKey,SecretKey}; use utils::test_logger; diff --git a/fuzz/src/router.rs b/fuzz/src/router.rs index 83e9a6abd..ae164ae2f 100644 --- a/fuzz/src/router.rs +++ b/fuzz/src/router.rs @@ -12,7 +12,7 @@ use lightning::ln::router::{Router, RouteHint}; use lightning::util::logger::Logger; use lightning::util::ser::Readable; -use secp256k1::key::PublicKey; +use bitcoin::secp256k1::key::PublicKey; use utils::test_logger; diff --git a/lightning-net-tokio/Cargo.toml b/lightning-net-tokio/Cargo.toml index 20d8509ce..70bc36a18 100644 --- a/lightning-net-tokio/Cargo.toml +++ b/lightning-net-tokio/Cargo.toml @@ -12,7 +12,6 @@ For Rust-Lightning clients which wish to make direct connections to Lightning P2 [dependencies] bitcoin = "0.21" lightning = { version = "0.0.11", path = "../lightning" } -secp256k1 = "0.15" tokio = { version = ">=0.2.12", features = [ "io-util", "macros", "rt-core", "sync", "tcp", "time" ] } [dev-dependencies] diff --git a/lightning-net-tokio/src/lib.rs b/lightning-net-tokio/src/lib.rs index dd0b861c1..e460df25e 100644 --- a/lightning-net-tokio/src/lib.rs +++ b/lightning-net-tokio/src/lib.rs @@ -16,7 +16,7 @@ //! ``` //! use tokio::sync::mpsc; //! use tokio::net::TcpStream; -//! use secp256k1::key::PublicKey; +//! use bitcoin::secp256k1::key::PublicKey; //! use lightning::util::events::EventsProvider; //! use std::net::SocketAddr; //! use std::sync::Arc; @@ -59,7 +59,7 @@ //! } //! ``` -use secp256k1::key::PublicKey; +use bitcoin::secp256k1::key::PublicKey; use tokio::net::TcpStream; use tokio::{io, time}; @@ -481,7 +481,7 @@ mod tests { use lightning::ln::msgs::*; use lightning::ln::peer_handler::{MessageHandler, PeerManager}; use lightning::util::events::*; - use secp256k1::{Secp256k1, SecretKey, PublicKey}; + use bitcoin::secp256k1::{Secp256k1, SecretKey, PublicKey}; use tokio::sync::mpsc; diff --git a/lightning/Cargo.toml b/lightning/Cargo.toml index 406e039d6..3b78a905b 100644 --- a/lightning/Cargo.toml +++ b/lightning/Cargo.toml @@ -13,7 +13,7 @@ Still missing tons of error-handling. See GitHub issues for suggested projects i [features] # Supports tracking channels with a non-bitcoin chain hashes. Currently enables all kinds of fun DoS attacks. non_bitcoin_chain_hash_routing = [] -fuzztarget = ["secp256k1/fuzztarget", "bitcoin/fuzztarget"] +fuzztarget = ["bitcoin/fuzztarget"] # Unlog messages superior at targeted level. max_level_off = [] max_level_error = [] @@ -23,7 +23,6 @@ max_level_debug = [] [dependencies] bitcoin = "0.21" -secp256k1 = "0.15" [dev-dependencies.bitcoin] version = "0.21" diff --git a/lightning/src/chain/keysinterface.rs b/lightning/src/chain/keysinterface.rs index daee746be..51a792396 100644 --- a/lightning/src/chain/keysinterface.rs +++ b/lightning/src/chain/keysinterface.rs @@ -15,9 +15,9 @@ use bitcoin::hashes::sha256::Hash as Sha256; use bitcoin::hashes::sha256d::Hash as Sha256dHash; use bitcoin::hashes::hash160::Hash as Hash160; -use secp256k1::key::{SecretKey, PublicKey}; -use secp256k1::{Secp256k1, Signature, Signing}; -use secp256k1; +use bitcoin::secp256k1::key::{SecretKey, PublicKey}; +use bitcoin::secp256k1::{Secp256k1, Signature, Signing}; +use bitcoin::secp256k1; use util::byte_utils; use util::logger::Logger; diff --git a/lightning/src/lib.rs b/lightning/src/lib.rs index 431caa608..039f2f3ac 100644 --- a/lightning/src/lib.rs +++ b/lightning/src/lib.rs @@ -19,7 +19,6 @@ #![allow(ellipsis_inclusive_range_patterns)] extern crate bitcoin; -extern crate secp256k1; #[cfg(test)] extern crate rand; #[cfg(test)] extern crate hex; diff --git a/lightning/src/ln/chan_utils.rs b/lightning/src/ln/chan_utils.rs index fca166b4a..3ab440d95 100644 --- a/lightning/src/ln/chan_utils.rs +++ b/lightning/src/ln/chan_utils.rs @@ -19,9 +19,9 @@ use ln::msgs::DecodeError; use util::ser::{Readable, Writeable, Writer, WriterWriteAdaptor}; use util::byte_utils; -use secp256k1::key::{SecretKey, PublicKey}; -use secp256k1::{Secp256k1, Signature}; -use secp256k1; +use bitcoin::secp256k1::key::{SecretKey, PublicKey}; +use bitcoin::secp256k1::{Secp256k1, Signature}; +use bitcoin::secp256k1; use std::{cmp, mem}; diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 68a697ddd..e08a7e93f 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -11,9 +11,9 @@ use bitcoin::hashes::sha256::Hash as Sha256; use bitcoin::hashes::hash160::Hash as Hash160; use bitcoin::hashes::sha256d::Hash as Sha256dHash; -use secp256k1::key::{PublicKey,SecretKey}; -use secp256k1::{Secp256k1,Signature}; -use secp256k1; +use bitcoin::secp256k1::key::{PublicKey,SecretKey}; +use bitcoin::secp256k1::{Secp256k1,Signature}; +use bitcoin::secp256k1; use ln::features::{ChannelFeatures, InitFeatures}; use ln::msgs; @@ -4307,8 +4307,8 @@ mod tests { use util::enforcing_trait_impls::EnforcingChannelKeys; use util::test_utils; use util::logger::Logger; - use secp256k1::{Secp256k1, Message, Signature, All}; - use secp256k1::key::{SecretKey,PublicKey}; + use bitcoin::secp256k1::{Secp256k1, Message, Signature, All}; + use bitcoin::secp256k1::key::{SecretKey,PublicKey}; use bitcoin::hashes::sha256::Hash as Sha256; use bitcoin::hashes::sha256d::Hash as Sha256dHash; use bitcoin::hashes::hash160::Hash as Hash160; diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 83ff133eb..78cf5987a 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -20,10 +20,10 @@ use bitcoin::hashes::sha256::Hash as Sha256; use bitcoin::hashes::sha256d::Hash as Sha256dHash; use bitcoin::hashes::cmp::fixed_time_eq; -use secp256k1::key::{SecretKey,PublicKey}; -use secp256k1::Secp256k1; -use secp256k1::ecdh::SharedSecret; -use secp256k1; +use bitcoin::secp256k1::key::{SecretKey,PublicKey}; +use bitcoin::secp256k1::Secp256k1; +use bitcoin::secp256k1::ecdh::SharedSecret; +use bitcoin::secp256k1; use chain::chaininterface::{BroadcasterInterface,ChainListener,FeeEstimator}; use chain::transaction::OutPoint; diff --git a/lightning/src/ln/channelmonitor.rs b/lightning/src/ln/channelmonitor.rs index 86a8591eb..6bddd302f 100644 --- a/lightning/src/ln/channelmonitor.rs +++ b/lightning/src/ln/channelmonitor.rs @@ -24,9 +24,9 @@ use bitcoin::hashes::sha256::Hash as Sha256; use bitcoin::hashes::hash160::Hash as Hash160; use bitcoin::hashes::sha256d::Hash as Sha256dHash; -use secp256k1::{Secp256k1,Signature}; -use secp256k1::key::{SecretKey,PublicKey}; -use secp256k1; +use bitcoin::secp256k1::{Secp256k1,Signature}; +use bitcoin::secp256k1::key::{SecretKey,PublicKey}; +use bitcoin::secp256k1; use ln::msgs::DecodeError; use ln::chan_utils; @@ -2530,8 +2530,8 @@ mod tests { use ln::chan_utils; use ln::chan_utils::{HTLCOutputInCommitment, LocalCommitmentTransaction}; use util::test_utils::TestLogger; - use secp256k1::key::{SecretKey,PublicKey}; - use secp256k1::Secp256k1; + use bitcoin::secp256k1::key::{SecretKey,PublicKey}; + use bitcoin::secp256k1::Secp256k1; use rand::{thread_rng,Rng}; use std::sync::Arc; use chain::keysinterface::InMemoryChannelKeys; diff --git a/lightning/src/ln/functional_test_utils.rs b/lightning/src/ln/functional_test_utils.rs index e59e5339e..2906fc51d 100644 --- a/lightning/src/ln/functional_test_utils.rs +++ b/lightning/src/ln/functional_test_utils.rs @@ -28,8 +28,8 @@ use bitcoin::hashes::sha256::Hash as Sha256; use bitcoin::hashes::sha256d::Hash as Sha256d; use bitcoin::hashes::Hash; -use secp256k1::Secp256k1; -use secp256k1::key::PublicKey; +use bitcoin::secp256k1::Secp256k1; +use bitcoin::secp256k1::key::PublicKey; use rand::{thread_rng,Rng}; diff --git a/lightning/src/ln/functional_tests.rs b/lightning/src/ln/functional_tests.rs index b91e0f8b7..49d0c0a9f 100644 --- a/lightning/src/ln/functional_tests.rs +++ b/lightning/src/ln/functional_tests.rs @@ -39,8 +39,8 @@ use bitcoin::network::constants::Network; use bitcoin::hashes::sha256::Hash as Sha256; use bitcoin::hashes::Hash; -use secp256k1::{Secp256k1, Message}; -use secp256k1::key::{PublicKey,SecretKey}; +use bitcoin::secp256k1::{Secp256k1, Message}; +use bitcoin::secp256k1::key::{PublicKey,SecretKey}; use std::collections::{BTreeSet, HashMap, HashSet}; use std::default::Default; @@ -5440,8 +5440,8 @@ fn run_onion_failure_test_with_fail_intercept(_name: &str, test_case: impl msgs::ChannelUpdate { fn dummy() -> msgs::ChannelUpdate { - use secp256k1::ffi::Signature as FFISignature; - use secp256k1::Signature; + use bitcoin::secp256k1::ffi::Signature as FFISignature; + use bitcoin::secp256k1::Signature; msgs::ChannelUpdate { signature: Signature::from(FFISignature::new()), contents: msgs::UnsignedChannelUpdate { @@ -5477,7 +5477,7 @@ impl Writeable for BogusOnionHopData { fn test_onion_failure() { use ln::msgs::ChannelUpdate; use ln::channelmanager::CLTV_FAR_FAR_AWAY; - use secp256k1; + use bitcoin::secp256k1; const BADONION: u16 = 0x8000; const PERM: u16 = 0x4000; diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index 310aea52a..6c1d3cd92 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -15,9 +15,9 @@ //! raw socket events into your non-internet-facing system and then send routing events back to //! track the network on the less-secure system. -use secp256k1::key::PublicKey; -use secp256k1::Signature; -use secp256k1; +use bitcoin::secp256k1::key::PublicKey; +use bitcoin::secp256k1::Signature; +use bitcoin::secp256k1; use bitcoin::hashes::sha256d::Hash as Sha256dHash; use bitcoin::blockdata::script::Script; @@ -1367,8 +1367,8 @@ mod tests { use bitcoin::blockdata::script::Builder; use bitcoin::blockdata::opcodes; - use secp256k1::key::{PublicKey,SecretKey}; - use secp256k1::{Secp256k1, Message}; + use bitcoin::secp256k1::key::{PublicKey,SecretKey}; + use bitcoin::secp256k1::{Secp256k1, Message}; use std::io::Cursor; diff --git a/lightning/src/ln/onchaintx.rs b/lightning/src/ln/onchaintx.rs index 531f7cd8b..dd393d82f 100644 --- a/lightning/src/ln/onchaintx.rs +++ b/lightning/src/ln/onchaintx.rs @@ -10,8 +10,8 @@ use bitcoin::util::bip143; use bitcoin::hashes::sha256d::Hash as Sha256dHash; -use secp256k1::{Secp256k1, Signature}; -use secp256k1; +use bitcoin::secp256k1::{Secp256k1, Signature}; +use bitcoin::secp256k1; use ln::msgs::DecodeError; use ln::channelmonitor::{ANTI_REORG_DELAY, CLTV_SHARED_CLAIM_BUFFER, InputMaterial, ClaimRequest}; diff --git a/lightning/src/ln/onion_utils.rs b/lightning/src/ln/onion_utils.rs index 2783c90c6..4128d0990 100644 --- a/lightning/src/ln/onion_utils.rs +++ b/lightning/src/ln/onion_utils.rs @@ -12,10 +12,10 @@ use bitcoin::hashes::cmp::fixed_time_eq; use bitcoin::hashes::hmac::{Hmac, HmacEngine}; use bitcoin::hashes::sha256::Hash as Sha256; -use secp256k1::key::{SecretKey,PublicKey}; -use secp256k1::Secp256k1; -use secp256k1::ecdh::SharedSecret; -use secp256k1; +use bitcoin::secp256k1::key::{SecretKey,PublicKey}; +use bitcoin::secp256k1::Secp256k1; +use bitcoin::secp256k1::ecdh::SharedSecret; +use bitcoin::secp256k1; use std::io::Cursor; use std::sync::Arc; @@ -478,8 +478,8 @@ mod tests { use hex; - use secp256k1::Secp256k1; - use secp256k1::key::{PublicKey,SecretKey}; + use bitcoin::secp256k1::Secp256k1; + use bitcoin::secp256k1::key::{PublicKey,SecretKey}; use super::OnionKeys; diff --git a/lightning/src/ln/peer_channel_encryptor.rs b/lightning/src/ln/peer_channel_encryptor.rs index 9585887d5..152426577 100644 --- a/lightning/src/ln/peer_channel_encryptor.rs +++ b/lightning/src/ln/peer_channel_encryptor.rs @@ -4,10 +4,10 @@ use ln::msgs; use bitcoin::hashes::{Hash, HashEngine, Hmac, HmacEngine}; use bitcoin::hashes::sha256::Hash as Sha256; -use secp256k1::Secp256k1; -use secp256k1::key::{PublicKey,SecretKey}; -use secp256k1::ecdh::SharedSecret; -use secp256k1; +use bitcoin::secp256k1::Secp256k1; +use bitcoin::secp256k1::key::{PublicKey,SecretKey}; +use bitcoin::secp256k1::ecdh::SharedSecret; +use bitcoin::secp256k1; use util::chacha20poly1305rfc::ChaCha20Poly1305RFC; use util::byte_utils; @@ -467,7 +467,7 @@ impl PeerChannelEncryptor { #[cfg(test)] mod tests { - use secp256k1::key::{PublicKey,SecretKey}; + use bitcoin::secp256k1::key::{PublicKey,SecretKey}; use hex; diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index 8005a40c1..b99f2f522 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -6,7 +6,7 @@ //! call into the provided message handlers (probably a ChannelManager and Router) with messages //! they should handle, and encoding/sending response messages. -use secp256k1::key::{SecretKey,PublicKey}; +use bitcoin::secp256k1::key::{SecretKey,PublicKey}; use ln::features::InitFeatures; use ln::msgs; @@ -1153,7 +1153,7 @@ impl PeerManager where #[cfg(test)] mod tests { - use secp256k1::Signature; + use bitcoin::secp256k1::Signature; use bitcoin::BitcoinHash; use bitcoin::network::constants::Network; use bitcoin::blockdata::constants::genesis_block; @@ -1164,8 +1164,8 @@ mod tests { use util::test_utils; use util::logger::Logger; - use secp256k1::Secp256k1; - use secp256k1::key::{SecretKey, PublicKey}; + use bitcoin::secp256k1::Secp256k1; + use bitcoin::secp256k1::key::{SecretKey, PublicKey}; use rand::{thread_rng, Rng}; @@ -1343,7 +1343,7 @@ mod tests { } fn get_dummy_channel_announcement(short_chan_id: u64) -> msgs::ChannelAnnouncement { - use secp256k1::ffi::Signature as FFISignature; + use bitcoin::secp256k1::ffi::Signature as FFISignature; let secp_ctx = Secp256k1::new(); let network = Network::Testnet; let node_1_privkey = SecretKey::from_slice(&[42; 32]).unwrap(); @@ -1371,7 +1371,7 @@ mod tests { } fn get_dummy_channel_update(short_chan_id: u64) -> msgs::ChannelUpdate { - use secp256k1::ffi::Signature as FFISignature; + use bitcoin::secp256k1::ffi::Signature as FFISignature; let network = Network::Testnet; msgs::ChannelUpdate { signature: Signature::from(FFISignature::new()), diff --git a/lightning/src/ln/router.rs b/lightning/src/ln/router.rs index bdb6f9828..a1a6e42d8 100644 --- a/lightning/src/ln/router.rs +++ b/lightning/src/ln/router.rs @@ -3,9 +3,9 @@ //! You probably want to create a Router and use that as your RoutingMessageHandler and then //! interrogate it to get routes for your own payments. -use secp256k1::key::PublicKey; -use secp256k1::Secp256k1; -use secp256k1; +use bitcoin::secp256k1::key::PublicKey; +use bitcoin::secp256k1::Secp256k1; +use bitcoin::secp256k1; use bitcoin::hashes::sha256d::Hash as Sha256dHash; use bitcoin::hashes::Hash; @@ -1095,9 +1095,9 @@ mod tests { use hex; - use secp256k1::key::{PublicKey,SecretKey}; - use secp256k1::All; - use secp256k1::Secp256k1; + use bitcoin::secp256k1::key::{PublicKey,SecretKey}; + use bitcoin::secp256k1::All; + use bitcoin::secp256k1::Secp256k1; use std::sync::Arc; use std::collections::btree_map::Entry as BtreeEntry; diff --git a/lightning/src/util/enforcing_trait_impls.rs b/lightning/src/util/enforcing_trait_impls.rs index 3e1ffd044..a4bfdf880 100644 --- a/lightning/src/util/enforcing_trait_impls.rs +++ b/lightning/src/util/enforcing_trait_impls.rs @@ -8,9 +8,9 @@ use std::sync::{Mutex, Arc}; use bitcoin::blockdata::transaction::Transaction; use bitcoin::util::bip143; -use secp256k1; -use secp256k1::key::{SecretKey, PublicKey}; -use secp256k1::{Secp256k1, Signature}; +use bitcoin::secp256k1; +use bitcoin::secp256k1::key::{SecretKey, PublicKey}; +use bitcoin::secp256k1::{Secp256k1, Signature}; use util::ser::{Writeable, Writer, Readable}; use std::io::Error; use ln::msgs::DecodeError; diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 43a2dc3bd..76ec20209 100644 --- a/lightning/src/util/events.rs +++ b/lightning/src/util/events.rs @@ -13,7 +13,7 @@ use util::ser::{Writeable, Writer, MaybeReadable, Readable}; use bitcoin::blockdata::script::Script; -use secp256k1::key::PublicKey; +use bitcoin::secp256k1::key::PublicKey; use std::time::Duration; diff --git a/lightning/src/util/fuzz_wrappers.rs b/lightning/src/util/fuzz_wrappers.rs index 508acf08d..42b4732f3 100644 --- a/lightning/src/util/fuzz_wrappers.rs +++ b/lightning/src/util/fuzz_wrappers.rs @@ -3,13 +3,13 @@ macro_rules! hash_to_message { { #[cfg(not(feature = "fuzztarget"))] { - ::secp256k1::Message::from_slice($slice).unwrap() + ::bitcoin::secp256k1::Message::from_slice($slice).unwrap() } #[cfg(feature = "fuzztarget")] { - match ::secp256k1::Message::from_slice($slice) { + match ::bitcoin::secp256k1::Message::from_slice($slice) { Ok(msg) => msg, - Err(_) => ::secp256k1::Message::from_slice(&[1; 32]).unwrap() + Err(_) => ::bitcoin::secp256k1::Message::from_slice(&[1; 32]).unwrap() } } } diff --git a/lightning/src/util/macro_logger.rs b/lightning/src/util/macro_logger.rs index f02fced7f..b6f89fe9b 100644 --- a/lightning/src/util/macro_logger.rs +++ b/lightning/src/util/macro_logger.rs @@ -3,7 +3,7 @@ use chain::keysinterface::SpendableOutputDescriptor; use bitcoin::hashes::sha256d::Hash as Sha256dHash; use bitcoin::blockdata::transaction::Transaction; -use secp256k1::key::PublicKey; +use bitcoin::secp256k1::key::PublicKey; use ln::router::Route; use ln::chan_utils::HTLCType; diff --git a/lightning/src/util/ser.rs b/lightning/src/util/ser.rs index 0f05dfe1a..fd0e9f7a3 100644 --- a/lightning/src/util/ser.rs +++ b/lightning/src/util/ser.rs @@ -8,8 +8,8 @@ use std::hash::Hash; use std::sync::Mutex; use std::cmp; -use secp256k1::Signature; -use secp256k1::key::{PublicKey, SecretKey}; +use bitcoin::secp256k1::Signature; +use bitcoin::secp256k1::key::{PublicKey, SecretKey}; use bitcoin::blockdata::script::Script; use bitcoin::blockdata::transaction::{OutPoint, Transaction, TxOut}; use bitcoin::consensus; diff --git a/lightning/src/util/ser_macros.rs b/lightning/src/util/ser_macros.rs index 28bd0e688..6758e36df 100644 --- a/lightning/src/util/ser_macros.rs +++ b/lightning/src/util/ser_macros.rs @@ -152,7 +152,7 @@ mod tests { use std::io::{Cursor, Read}; use ln::msgs::DecodeError; use util::ser::{Readable, Writeable, HighZeroBytesDroppedVarInt, VecWriter}; - use secp256k1::PublicKey; + use bitcoin::secp256k1::PublicKey; // The BOLT TLV test cases don't include any tests which use our "required-value" logic since // the encoding layer in the BOLTs has no such concept, though it makes our macros easier to diff --git a/lightning/src/util/test_utils.rs b/lightning/src/util/test_utils.rs index 658e8b58e..12b489446 100644 --- a/lightning/src/util/test_utils.rs +++ b/lightning/src/util/test_utils.rs @@ -19,7 +19,7 @@ use bitcoin::blockdata::opcodes; use bitcoin::hashes::sha256d::Hash as Sha256dHash; use bitcoin::network::constants::Network; -use secp256k1::{SecretKey, PublicKey}; +use bitcoin::secp256k1::{SecretKey, PublicKey}; use std::time::{SystemTime, UNIX_EPOCH}; use std::sync::{Arc,Mutex};