projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4909d3c
)
BDR: Linearizing secp256k1 deps
author
Dr. Maxim Orlovsky
<orlovsky@pandoracore.com>
Mon, 27 Apr 2020 14:51:59 +0000
(16:51 +0200)
committer
Dr. Maxim Orlovsky
<orlovsky@pandoracore.com>
Tue, 28 Apr 2020 14:17:44 +0000
(16:17 +0200)
28 files changed:
fuzz/src/chanmon_consistency.rs
patch
|
blob
|
history
fuzz/src/full_stack.rs
patch
|
blob
|
history
fuzz/src/peer_crypt.rs
patch
|
blob
|
history
fuzz/src/router.rs
patch
|
blob
|
history
lightning-net-tokio/Cargo.toml
patch
|
blob
|
history
lightning-net-tokio/src/lib.rs
patch
|
blob
|
history
lightning/Cargo.toml
patch
|
blob
|
history
lightning/src/chain/keysinterface.rs
patch
|
blob
|
history
lightning/src/lib.rs
patch
|
blob
|
history
lightning/src/ln/chan_utils.rs
patch
|
blob
|
history
lightning/src/ln/channel.rs
patch
|
blob
|
history
lightning/src/ln/channelmanager.rs
patch
|
blob
|
history
lightning/src/ln/channelmonitor.rs
patch
|
blob
|
history
lightning/src/ln/functional_test_utils.rs
patch
|
blob
|
history
lightning/src/ln/functional_tests.rs
patch
|
blob
|
history
lightning/src/ln/msgs.rs
patch
|
blob
|
history
lightning/src/ln/onchaintx.rs
patch
|
blob
|
history
lightning/src/ln/onion_utils.rs
patch
|
blob
|
history
lightning/src/ln/peer_channel_encryptor.rs
patch
|
blob
|
history
lightning/src/ln/peer_handler.rs
patch
|
blob
|
history
lightning/src/ln/router.rs
patch
|
blob
|
history
lightning/src/util/enforcing_trait_impls.rs
patch
|
blob
|
history
lightning/src/util/events.rs
patch
|
blob
|
history
lightning/src/util/fuzz_wrappers.rs
patch
|
blob
|
history
lightning/src/util/macro_logger.rs
patch
|
blob
|
history
lightning/src/util/ser.rs
patch
|
blob
|
history
lightning/src/util/ser_macros.rs
patch
|
blob
|
history
lightning/src/util/test_utils.rs
patch
|
blob
|
history
diff --git
a/fuzz/src/chanmon_consistency.rs
b/fuzz/src/chanmon_consistency.rs
index 344d099ff052463932f8fda81c4ce827e12d4833..d458c6b96646a9a634f26946f286aaac157215af 100644
(file)
--- 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 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;
use std::mem;
use std::cmp::Ordering;
diff --git
a/fuzz/src/full_stack.rs
b/fuzz/src/full_stack.rs
index d8b58264e7a624742f53e9528b6b1ae755f1549c..83318abe83e05edfab88252a90302218e2eb40e6 100644
(file)
--- 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 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};
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 176a7caab6530dcbf0d6f7cf0f704a9d7e21d96c..0d200d83a194f885d303e1a2d15ae48b118428b9 100644
(file)
--- a/
fuzz/src/peer_crypt.rs
+++ b/
fuzz/src/peer_crypt.rs
@@
-1,6
+1,6
@@
use lightning::ln::peer_channel_encryptor::PeerChannelEncryptor;
use lightning::ln::peer_channel_encryptor::PeerChannelEncryptor;
-use secp256k1::key::{PublicKey,SecretKey};
+use
bitcoin::
secp256k1::key::{PublicKey,SecretKey};
use utils::test_logger;
use utils::test_logger;
diff --git
a/fuzz/src/router.rs
b/fuzz/src/router.rs
index 83e9a6abdb1a9fd3ebca283058a3e460606fa6a6..ae164ae2f449a10563dbd2d7c8ff5f395b83d79c 100644
(file)
--- 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 lightning::util::logger::Logger;
use lightning::util::ser::Readable;
-use secp256k1::key::PublicKey;
+use
bitcoin::
secp256k1::key::PublicKey;
use utils::test_logger;
use utils::test_logger;
diff --git
a/lightning-net-tokio/Cargo.toml
b/lightning-net-tokio/Cargo.toml
index 20d8509ce3ecc85d20b2b15a4f3e0d21cc6caf77..70bc36a18309f195819fe63b3de90833e233190f 100644
(file)
--- 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" }
[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]
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 dd0b861c197a54fcd45242bbd4250af919511c90..e460df25e54d192e92548feb5b6053715798fd27 100644
(file)
--- 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 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;
//! 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};
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 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;
use tokio::sync::mpsc;
diff --git
a/lightning/Cargo.toml
b/lightning/Cargo.toml
index 406e039d62e7957cf689471250f8945c02f5e79d..3b78a905baa319474e5a4456bcd99a7c99f437f8 100644
(file)
--- 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 = []
[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 = []
# Unlog messages superior at targeted level.
max_level_off = []
max_level_error = []
@@
-23,7
+23,6
@@
max_level_debug = []
[dependencies]
bitcoin = "0.21"
[dependencies]
bitcoin = "0.21"
-secp256k1 = "0.15"
[dev-dependencies.bitcoin]
version = "0.21"
[dev-dependencies.bitcoin]
version = "0.21"
diff --git
a/lightning/src/chain/keysinterface.rs
b/lightning/src/chain/keysinterface.rs
index daee746bed7687553b50bb018e6182223c486aa0..51a7923963e599891fddb4a20107964184f6ba91 100644
(file)
--- 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 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;
use util::byte_utils;
use util::logger::Logger;
diff --git
a/lightning/src/lib.rs
b/lightning/src/lib.rs
index 431caa6080106cd43064a4979ffbff1643194885..039f2f3aca1c9e36422aae2bea755f0de4c931cb 100644
(file)
--- a/
lightning/src/lib.rs
+++ b/
lightning/src/lib.rs
@@
-19,7
+19,6
@@
#![allow(ellipsis_inclusive_range_patterns)]
extern crate bitcoin;
#![allow(ellipsis_inclusive_range_patterns)]
extern crate bitcoin;
-extern crate secp256k1;
#[cfg(test)] extern crate rand;
#[cfg(test)] extern crate hex;
#[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 fca166b4a6113d3d3c413a8008e8914c4244cc4c..3ab440d95f254d18da9ed677e6435ed864d26aa2 100644
(file)
--- 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 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};
use std::{cmp, mem};
diff --git
a/lightning/src/ln/channel.rs
b/lightning/src/ln/channel.rs
index 68a697ddd76491aff792a540893b64e589264692..e08a7e93fb8c676d37d91e1525ddd16d788059cc 100644
(file)
--- 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 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;
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 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;
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 83ff133eb3f3246c495e573e47eee7243a03cd52..78cf5987afd80d03334847dc07705a5cca3bbdb7 100644
(file)
--- 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 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;
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 86a8591ebbac518079e7209b1ad2bd2bfe4794a4..6bddd302ffc64163e2fb76944bc60df7b76f7764 100644
(file)
--- 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 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;
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 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;
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 e59e5339e0bda4bba4adf76d2eee1d8bbb3bcd6e..2906fc51d9a8b0643c706221e04cdeab1f6cea28 100644
(file)
--- 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 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};
use rand::{thread_rng,Rng};
diff --git
a/lightning/src/ln/functional_tests.rs
b/lightning/src/ln/functional_tests.rs
index b91e0f8b7f2272ea8605580940919e3a43ede4b0..49d0c0a9fe5ad26d97a1aba43d116f415c4131e2 100644
(file)
--- 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 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;
use std::collections::{BTreeSet, HashMap, HashSet};
use std::default::Default;
@@
-5440,8
+5440,8
@@
fn run_onion_failure_test_with_fail_intercept<F1,F2,F3>(_name: &str, test_case:
impl msgs::ChannelUpdate {
fn dummy() -> msgs::ChannelUpdate {
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 {
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;
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;
const BADONION: u16 = 0x8000;
const PERM: u16 = 0x4000;
diff --git
a/lightning/src/ln/msgs.rs
b/lightning/src/ln/msgs.rs
index 310aea52aa76614c087e90edef1dff660896c3da..6c1d3cd928700a13550327c87d47b6fe1d634577 100644
(file)
--- 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.
//! 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;
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 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;
use std::io::Cursor;
diff --git
a/lightning/src/ln/onchaintx.rs
b/lightning/src/ln/onchaintx.rs
index 531f7cd8b624604461564871af642fb525a9eb1c..dd393d82f8bc8fb044f18378948d8c67999c3460 100644
(file)
--- 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 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};
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 2783c90c69c61bdf4034888fd27bf6c99eee1415..4128d09905f0a2ee5379c95f1b5f730b83656fc5 100644
(file)
--- 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 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;
use std::io::Cursor;
use std::sync::Arc;
@@
-478,8
+478,8
@@
mod tests {
use hex;
use hex;
- use secp256k1::Secp256k1;
- use secp256k1::key::{PublicKey,SecretKey};
+ use
bitcoin::
secp256k1::Secp256k1;
+ use
bitcoin::
secp256k1::key::{PublicKey,SecretKey};
use super::OnionKeys;
use super::OnionKeys;
diff --git
a/lightning/src/ln/peer_channel_encryptor.rs
b/lightning/src/ln/peer_channel_encryptor.rs
index 9585887d5dbd12fcf3babe8edaf8db36b2fc44a5..152426577adf33a7980c00890c3eae830a738b4f 100644
(file)
--- 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 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;
use util::chacha20poly1305rfc::ChaCha20Poly1305RFC;
use util::byte_utils;
@@
-467,7
+467,7
@@
impl PeerChannelEncryptor {
#[cfg(test)]
mod tests {
#[cfg(test)]
mod tests {
- use secp256k1::key::{PublicKey,SecretKey};
+ use
bitcoin::
secp256k1::key::{PublicKey,SecretKey};
use hex;
use hex;
diff --git
a/lightning/src/ln/peer_handler.rs
b/lightning/src/ln/peer_handler.rs
index 8005a40c10d2c220e921067f2a4796cf79ebec8f..b99f2f522709dd56cbe01a5d441bb77f7892b255 100644
(file)
--- 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.
//! 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;
use ln::features::InitFeatures;
use ln::msgs;
@@
-1153,7
+1153,7
@@
impl<Descriptor: SocketDescriptor, CM: Deref> PeerManager<Descriptor, CM> where
#[cfg(test)]
mod tests {
#[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;
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 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};
use rand::{thread_rng, Rng};
@@
-1343,7
+1343,7
@@
mod tests {
}
fn get_dummy_channel_announcement(short_chan_id: u64) -> msgs::ChannelAnnouncement {
}
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();
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 {
}
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()),
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 bdb6f9828a486a71bc3c2f365aa138e97f5fd2d8..a1a6e42d8f51ec3c00f7524e38458152a89f328f 100644
(file)
--- 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.
//! 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;
use bitcoin::hashes::sha256d::Hash as Sha256dHash;
use bitcoin::hashes::Hash;
@@
-1095,9
+1095,9
@@
mod tests {
use hex;
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;
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 3e1ffd04446021a4e00d5e0a5fe55318128a6d2e..a4bfdf8800a398594b64f2f771fa68e28abad1c1 100644
(file)
--- 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 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;
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 43a2dc3bd6f881ab4ec69241f30f5a2b37651a8e..76ec20209412a8ddc4865aa931c3265a5275f60e 100644
(file)
--- 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 bitcoin::blockdata::script::Script;
-use secp256k1::key::PublicKey;
+use
bitcoin::
secp256k1::key::PublicKey;
use std::time::Duration;
use std::time::Duration;
diff --git
a/lightning/src/util/fuzz_wrappers.rs
b/lightning/src/util/fuzz_wrappers.rs
index 508acf08d1ddc629252a63064a374a93bc4afdd3..42b4732f370275f08c6bda6dc0581f6b67cf555d 100644
(file)
--- 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"))]
{
{
#[cfg(not(feature = "fuzztarget"))]
{
- ::secp256k1::Message::from_slice($slice).unwrap()
+ ::
bitcoin::
secp256k1::Message::from_slice($slice).unwrap()
}
#[cfg(feature = "fuzztarget")]
{
}
#[cfg(feature = "fuzztarget")]
{
- match ::secp256k1::Message::from_slice($slice) {
+ match ::
bitcoin::
secp256k1::Message::from_slice($slice) {
Ok(msg) => msg,
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 f02fced7fd86f1ce6febd315d3f7367182f83fdf..b6f89fe9b191cc98dc3e9acfcb59ca4be77568da 100644
(file)
--- 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 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;
use ln::router::Route;
use ln::chan_utils::HTLCType;
diff --git
a/lightning/src/util/ser.rs
b/lightning/src/util/ser.rs
index 0f05dfe1afa81245724cb54fccb9cda8d5a377bc..fd0e9f7a383b2bb9e0530e183e5ee9203218e065 100644
(file)
--- 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 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;
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 28bd0e6882bb38cd8ab552117856685ac1690fa1..6758e36dff551adffc9c58e88cd1977766984001 100644
(file)
--- 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 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
// 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 658e8b58eda5093bf8c0b4630d39a963c4b8dcb3..12b48944677bf1f97332c68aac8ade044efa295e 100644
(file)
--- 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 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};
use std::time::{SystemTime, UNIX_EPOCH};
use std::sync::{Arc,Mutex};